forked from TrueCloudLab/frostfs-http-gw
[#186] Don't print env vars with empty values
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
This commit is contained in:
parent
ee49355bb7
commit
9d4049cfe3
1 changed files with 6 additions and 1 deletions
|
@ -182,8 +182,13 @@ func settings() *viper.Viper {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defaultValue := v.GetString(keys[i])
|
||||||
|
if len(defaultValue) == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
k := strings.Replace(keys[i], ".", "_", -1)
|
k := strings.Replace(keys[i], ".", "_", -1)
|
||||||
fmt.Printf("%s_%s = %v\n", Prefix, strings.ToUpper(k), v.Get(keys[i]))
|
fmt.Printf("%s_%s = %s\n", Prefix, strings.ToUpper(k), defaultValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
|
|
Loading…
Reference in a new issue