TryDownloadGeoLite2DB 尝试下载GeoLite2数据库,失败时不报错
(filePath string)
| 465 | |
| 466 | // TryDownloadGeoLite2DB 尝试下载GeoLite2数据库,失败时不报错 |
| 467 | func TryDownloadGeoLite2DB(filePath string) bool { |
| 468 | err := DownloadGeoLite2DB(filePath) |
| 469 | if err != nil { |
| 470 | printError(fmt.Sprintf("下载GeoLite2数据库失败: %v", err)) |
| 471 | printInfo("将跳过地理位置功能") |
| 472 | return false |
| 473 | } |
| 474 | return true |
| 475 | } |
no test coverage detected