MCPcopy
hub / github.com/mislav/hub / Bool

Method Bool

utils/args_parser.go:168–174  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

166}
167
168func (p *ArgsParser) Bool(name string) bool {
169 if f, found := p.flagMap[name]; found {
170 return len(f.values) > 0 && f.lastValue() != "false"
171 } else {
172 return false
173 }
174}
175
176func (p *ArgsParser) Int(name string) int {
177 i, _ := strconv.Atoi(p.Value(name))

Callers 15

TestArgsParser_BoolFunction · 0.95
TestArgsParser_BoolValueFunction · 0.95
TestArgsParser_ShorthandFunction · 0.95
runHelpFunction · 0.95
TestArgsParser_WithUsageFunction · 0.80
listReleasesFunction · 0.80
showReleaseFunction · 0.80
createReleaseFunction · 0.80
editReleaseFunction · 0.80
compareFunction · 0.80

Calls 1

lastValueMethod · 0.80

Tested by 6

TestArgsParser_BoolFunction · 0.76
TestArgsParser_BoolValueFunction · 0.76
TestArgsParser_ShorthandFunction · 0.76
TestArgsParser_WithUsageFunction · 0.64