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

Function BoolVarP

bool.go:66–69  ·  view source on GitHub ↗

BoolVarP is like BoolVar, but accepts a shorthand letter that can be used after a single dash.

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

Source from the content-addressed store, hash-verified

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) {
67 flag := CommandLine.VarPF(newBoolValue(value, p), name, shorthand, usage)
68 flag.NoOptDefVal = "true"
69}
70
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.

Callers 1

BoolVarFunction · 0.85

Calls 2

newBoolValueFunction · 0.85
VarPFMethod · 0.80

Tested by

no test coverage detected