StringToIntVar defines a string flag with specified name, default value, and usage string. The argument p points to a map[string]int variable in which to store the values of the multiple flags. The value of each argument will not try to be separated by comma
(p *map[string]int, name string, value map[string]int, usage string)
| 100 | // The argument p points to a map[string]int variable in which to store the values of the multiple flags. |
| 101 | // The value of each argument will not try to be separated by comma |
| 102 | func (f *FlagSet) StringToIntVar(p *map[string]int, name string, value map[string]int, usage string) { |
| 103 | f.VarP(newStringToIntValue(value, p), name, "", usage) |
| 104 | } |
| 105 | |
| 106 | // StringToIntVarP is like StringToIntVar, but accepts a shorthand letter that can be used after a single dash. |
| 107 | func (f *FlagSet) StringToIntVarP(p *map[string]int, name, shorthand string, value map[string]int, usage string) { |