Documentation ¶
Index ¶
Constants ¶
View Source
const ( // GeoIP Database下载地址 DownloadPath = "https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz" // 数据库文件名 DatabaseName = "GeoLite2-City.mmdb" )
Variables ¶
This section is empty.
Functions ¶
func GetCountryCity ¶
GetCountryCity 返回ip的国家/地区和城市名称 lang为语言名称,e.g. "zh-CN", "en"
func GetGeoIPSavePath ¶
GetGeoIPSavePath 返回完整的数据库路径,默认在$HOME/.local/share/data/schannel-qt5/GeoIP下
func IsGeoIPOutdated ¶
IsGeoIPOutdated 判断数据库文件是否过期 文件不存在时也会返回true
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.