DurationP is like Duration, but accepts a shorthand letter that can be used after a single dash.
(name, shorthand string, value time.Duration, usage string)
| 69 | |
| 70 | // DurationP is like Duration, but accepts a shorthand letter that can be used after a single dash. |
| 71 | func (f *FlagSet) DurationP(name, shorthand string, value time.Duration, usage string) *time.Duration { |
| 72 | p := new(time.Duration) |
| 73 | f.DurationVarP(p, name, shorthand, value, usage) |
| 74 | return p |
| 75 | } |
| 76 | |
| 77 | // Duration defines a time.Duration flag with specified name, default value, and usage string. |
| 78 | // The return value is the address of a time.Duration variable that stores the value of the flag. |
no test coverage detected