standardize config help defaults (#14788)

This commit is contained in:
Sidhartha Mani
2022-04-27 08:41:37 +05:30
committed by GitHub
parent c56a139fdc
commit fe1fbe0005
16 changed files with 291 additions and 189 deletions
+9
View File
@@ -87,3 +87,12 @@ var (
},
}
)
// DefaultHelpPostfix - Helper function to add (default: $value) messages in config help
func DefaultHelpPostfix(subsystem KVS, key string) string {
val, found := subsystem.Lookup(key)
if !found || val == "" {
return ""
}
return " (default: '" + val + "')"
}