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

Function Bool

bool.go:86–88  ·  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

84// Bool defines a bool flag with specified name, default value, and usage string.
85// The return value is the address of a bool variable that stores the value of the flag.
86func Bool(name string, value bool, usage string) *bool {
87 return BoolP(name, "", value, usage)
88}
89
90// BoolP is like Bool, but accepts a shorthand letter that can be used after a single dash.
91func BoolP(name, shorthand string, value bool, usage string) *bool {

Callers 2

flag_test.goFile · 0.85
TestChangingArgsFunction · 0.85

Calls 1

BoolPFunction · 0.85

Tested by 1

TestChangingArgsFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…