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

Method Bool

bool.go:73–75  ·  view source on GitHub ↗

Bool defines a bool flag with specified name, default value, and usage string. The return value is the address of a bool variable that stores the value of the flag.

(name string, value bool, usage string)

Source from the content-addressed store, hash-verified

71// Bool defines a bool flag with specified name, default value, and usage string.
72// The return value is the address of a bool variable that stores the value of the flag.
73func (f *FlagSet) Bool(name string, value bool, usage string) *bool {
74 return f.BoolP(name, "", value, usage)
75}
76
77// BoolP is like Bool, but accepts a shorthand letter that can be used after a single dash.
78func (f *FlagSet) BoolP(name, shorthand string, value bool, usage string) *bool {

Callers 15

setUpPFlagSetFunction · 0.95
setUpPFlagSet2Function · 0.95
TestChangedHelperFunction · 0.95
TestNoInterspersedFunction · 0.95
getDeprecatedFlagSetFunction · 0.95
TestDeprecatedFlagUsageFunction · 0.95

Calls 1

BoolPMethod · 0.95

Tested by 15

setUpPFlagSetFunction · 0.76
setUpPFlagSet2Function · 0.76
TestChangedHelperFunction · 0.76
TestNoInterspersedFunction · 0.76
getDeprecatedFlagSetFunction · 0.76
TestDeprecatedFlagUsageFunction · 0.76