From 6f88ae755a144b871c71da31be7736452aaec48c Mon Sep 17 00:00:00 2001 From: Geert Baeke Date: Thu, 2 Sep 2021 17:04:56 +0200 Subject: [PATCH] viper automaticenv --- cmd/app/main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/app/main.go b/cmd/app/main.go index 84b7b16..a58aa75 100644 --- a/cmd/app/main.go +++ b/cmd/app/main.go @@ -41,6 +41,7 @@ func main() { viper.SetConfigName("config") viper.SetConfigType("toml") viper.AddConfigPath(".") + viper.AutomaticEnv() err = viper.ReadInConfig() if err != nil { fmt.Fprintf(os.Stderr, "viper read config error %s\n", err.Error())