StringVarP registers --name with optional short form -s.
(p *string, name, shorthand string, value, usage string)
| 24 | |
| 25 | // StringVarP registers --name with optional short form -s. |
| 26 | func (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. |
| 36 | func (a *ocrFlagSet) BoolVarP(p *bool, name, shorthand string, value bool, usage string) { |
no test coverage detected