Geo 地理位置查询结构体
| 41 | |
| 42 | // Geo 地理位置查询结构体 |
| 43 | type Geo struct { |
| 44 | geoReader *geoip2.Reader |
| 45 | mu sync.Mutex // 保证线程安全 |
| 46 | } |
| 47 | |
| 48 | // NewGeo 创建新的地理位置查询实例 |
| 49 | func NewGeo(dbPath string) (*Geo, error) { |
nothing calls this directly
no outgoing calls
no test coverage detected