MCPcopy Create free account
hub / github.com/alibaba/open-code-review / StringVarP

Method StringVarP

cmd/opencodereview/flags.go:26–33  ·  view source on GitHub ↗

StringVarP registers --name with optional short form -s.

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

Source from the content-addressed store, hash-verified

24
25// StringVarP registers --name with optional short form -s.
26func (a *ocrFlagSet) StringVarP(p *string, name, shorthand string, value, usage string) {
27 suffix := ""
28 if shorthand != "" {
29 a.shortMap[shorthand] = name
30 suffix = fmt.Sprintf(" (shorthand: -%s)", shorthand)
31 }
32 a.fs.StringVar(p, name, value, usage+suffix)
33}
34
35// BoolVarP registers --name with optional short form -s.
36func (a *ocrFlagSet) BoolVarP(p *bool, name, shorthand string, value bool, usage string) {

Callers 3

parseDelegateFlagsFunction · 0.80
parseReviewFlagsFunction · 0.80
parseScanFlagsFunction · 0.80

Calls 1

StringVarMethod · 0.80

Tested by

no test coverage detected