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

Function setUpFlagSet

bool_test.go:58–64  ·  view source on GitHub ↗
(tristate *triStateValue)

Source from the content-addressed store, hash-verified

56}
57
58func setUpFlagSet(tristate *triStateValue) *FlagSet {
59 f := NewFlagSet("test", ContinueOnError)
60 *tristate = triStateFalse
61 flag := f.VarPF(tristate, "tristate", "t", "tristate value (true, maybe or false)")
62 flag.NoOptDefVal = "true"
63 return f
64}
65
66func TestExplicitTrue(t *testing.T) {
67 var tristate triStateValue

Callers 8

TestExplicitTrueFunction · 0.85
TestImplicitTrueFunction · 0.85
TestShortFlagFunction · 0.85
TestExplicitMaybeFunction · 0.85
TestExplicitFalseFunction · 0.85
TestImplicitFalseFunction · 0.85
TestInvalidValueFunction · 0.85

Calls 2

VarPFMethod · 0.95
NewFlagSetFunction · 0.85

Tested by

no test coverage detected