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

Method BoolVar

bool.go:49–51  ·  view source on GitHub ↗

BoolVar defines a bool flag with specified name, default value, and usage string. The argument p points to a bool variable in which to store the value of the flag.

(p *bool, name string, value bool, usage string)

Source from the content-addressed store, hash-verified

47// BoolVar defines a bool flag with specified name, default value, and usage string.
48// The argument p points to a bool variable in which to store the value of the flag.
49func (f *FlagSet) BoolVar(p *bool, name string, value bool, usage string) {
50 f.BoolVarP(p, name, "", value, usage)
51}
52
53// BoolVarP is like BoolVar, but accepts a shorthand letter that can be used after a single dash.
54func (f *FlagSet) BoolVarP(p *bool, name, shorthand string, value bool, usage string) {

Callers 1

TestHelpFunction · 0.95

Calls 1

BoolVarPMethod · 0.95

Tested by 1

TestHelpFunction · 0.76