Im using go viper to read config
file in my repo
myrepo
-config.yaml
-main.go
I use the following code
viper.SetConfigName("config")
viper.AddConfigPath(".")
viper.SetConfigType("yaml")
err := viper.ReadInConfig()
And now I compile it to binary and now im running it from diffrent path (run the bin) and I got error that the config not found, what could be wrong here ?
The file is there and If I use ioutil.ReadFile
in debug I get it but not from the executable...