When you can't find a conf file by your Golang code
That happens because Go search for a config file at the root of your project. This solution works if the file is in some other directory. workingdir, err := os.Getwd() if err != nil { log.Fatalf("can't get pwd: %s", err) } and then viper.AddConf...
Jun 17, 20221 min read83