MCPcopy
hub / github.com/mislav/hub / RegisterBool

Method RegisterBool

utils/args_parser.go:144–150  ·  view source on GitHub ↗
(name string, aliases ...string)

Source from the content-addressed store, hash-verified

142}
143
144func (p *ArgsParser) RegisterBool(name string, aliases ...string) {
145 f := &argsFlag{expectsValue: false}
146 p.flagMap[name] = f
147 for _, alias := range aliases {
148 p.flagAliases[alias] = name
149 }
150}
151
152func (p *ArgsParser) Value(name string) string {
153 if f, found := p.flagMap[name]; found {

Callers 7

TestArgsParser_BoolFunction · 0.95
TestArgsParser_BoolValueFunction · 0.95
TestArgsParser_ShorthandFunction · 0.95
NewArgsParserWithUsageFunction · 0.95
runHelpFunction · 0.95

Calls

no outgoing calls

Tested by 5

TestArgsParser_BoolFunction · 0.76
TestArgsParser_BoolValueFunction · 0.76
TestArgsParser_ShorthandFunction · 0.76