Improve: config convergent and add log-level
This commit is contained in:
@ -11,7 +11,6 @@ import (
|
||||
"strings"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
"gopkg.in/ini.v1"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -107,13 +106,3 @@ func downloadMMDB(path string) (err error) {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func GetConfig() (*ini.File, error) {
|
||||
if _, err := os.Stat(ConfigPath); os.IsNotExist(err) {
|
||||
return nil, err
|
||||
}
|
||||
return ini.LoadSources(
|
||||
ini.LoadOptions{AllowBooleanKeys: true},
|
||||
ConfigPath,
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user