String defines a string flag with specified name, default value, and usage string. The return value is the address of a string variable that stores the value of the flag.
(name string, value string, usage string)
| 56 | // String defines a string flag with specified name, default value, and usage string. |
| 57 | // The return value is the address of a string variable that stores the value of the flag. |
| 58 | func (f *FlagSet) String(name string, value string, usage string) *string { |
| 59 | p := new(string) |
| 60 | f.StringVarP(p, name, "", value, usage) |
| 61 | return p |
| 62 | } |
| 63 | |
| 64 | // StringP is like String, but accepts a shorthand letter that can be used after a single dash. |
| 65 | func (f *FlagSet) StringP(name, shorthand string, value string, usage string) *string { |