MCPcopy
hub / github.com/spf13/pflag / PrintDefaults

Method PrintDefaults

flag.go:552–555  ·  view source on GitHub ↗

PrintDefaults prints, to standard error unless configured otherwise, the default values of all defined flags in the set.

()

Source from the content-addressed store, hash-verified

550// PrintDefaults prints, to standard error unless configured
551// otherwise, the default values of all defined flags in the set.
552func (f *FlagSet) PrintDefaults() {
553 usages := f.FlagUsages()
554 fmt.Fprint(f.Output(), usages)
555}
556
557// defaultIsZeroValue returns true if the default value for this flag represents
558// a zero value.

Callers 8

TestHiddenFlagInUsageFunction · 0.95
TestPrintDefaultsFunction · 0.95
TestPrintUsageFunction · 0.80
TestDeprecatedFlagInDocsFunction · 0.80
PrintDefaultsFunction · 0.80
defaultUsageFunction · 0.80

Calls 2

FlagUsagesMethod · 0.95
OutputMethod · 0.95

Tested by 6

TestHiddenFlagInUsageFunction · 0.76
TestPrintDefaultsFunction · 0.76
TestPrintUsageFunction · 0.64
TestDeprecatedFlagInDocsFunction · 0.64