[#607] Don't print env vars with empty values

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
support/v0.25
Angira Kekteeva 2022-07-28 17:27:18 +04:00 committed by Kirillov Denis
parent 08898f4fb4
commit 57ce0f25bf
1 changed files with 6 additions and 1 deletions

View File

@ -271,8 +271,13 @@ func newSettings() *viper.Viper {
continue
}
defaultValue := v.GetString(keys[i])
if len(defaultValue) == 0 {
continue
}
k := strings.Replace(keys[i], ".", "_", -1)
fmt.Printf("%s_%s = %v\n", envPrefix, strings.ToUpper(k), v.Get(keys[i]))
fmt.Printf("%s_%s = %s\n", envPrefix, strings.ToUpper(k), defaultValue)
}
fmt.Println()