standardize config help defaults (#14788)

This commit is contained in:
Sidhartha Mani authored and GitHub committed 2022-04-26 20:11:37 -07:00
1 parent c56a139fdc
commit fe1fbe0005
16 files changed
+291 -189

No files matched your search

+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 + "')"
}