🔧 Added PWD path for config search

This commit is contained in:
Maxim Lebedev 2022-02-02 22:52:36 +05:00
parent eaa09ba8db
commit 4931c2021c
Signed by: toby3d
GPG Key ID: 1F14E25B7C119FC5
1 changed files with 2 additions and 0 deletions

View File

@ -100,8 +100,10 @@ func init() {
flag.BoolVar(&enablePprof, "pprof", false, "enable pprof mode")
flag.Parse()
viper.AddConfigPath(".")
viper.AddConfigPath(filepath.Join(".", "configs"))
viper.SetConfigName("config")
viper.SetConfigType("yml")
if configPath != "" {
viper.SetConfigFile(configPath)