[#607] Don't print env vars with empty values
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
This commit is contained in:
parent
08898f4fb4
commit
57ce0f25bf
1 changed files with 6 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue