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

Function BoolVar

bool.go:61–63  ·  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

59// BoolVar defines a bool flag with specified name, default value, and usage string.
60// The argument p points to a bool variable in which to store the value of the flag.
61func BoolVar(p *bool, name string, value bool, usage string) {
62 BoolVarP(p, name, "", value, usage)
63}
64
65// BoolVarP is like BoolVar, but accepts a shorthand letter that can be used after a single dash.
66func BoolVarP(p *bool, name, shorthand string, value bool, usage string) {

Callers

nothing calls this directly

Calls 1

BoolVarPFunction · 0.85

Tested by

no test coverage detected