Chore: refactoring code of config path

This commit is contained in:
Dreamacro
2018-10-14 21:22:58 +08:00
parent 64e3791654
commit 381f764507
5 changed files with 68 additions and 48 deletions

View File

@ -42,7 +42,7 @@ func (g *GEOIP) Payload() string {
func NewGEOIP(country string, adapter string) *GEOIP {
once.Do(func() {
var err error
mmdb, err = geoip2.Open(C.MMDBPath)
mmdb, err = geoip2.Open(C.Path.MMDB())
if err != nil {
log.Fatalf("Can't load mmdb: %s", err.Error())
}