DurationVar defines a time.Duration flag with specified name, default value, and usage string. The argument p points to a time.Duration variable in which to store the value of the flag.
(p *time.Duration, name string, value time.Duration, usage string)
| 40 | // DurationVar defines a time.Duration flag with specified name, default value, and usage string. |
| 41 | // The argument p points to a time.Duration variable in which to store the value of the flag. |
| 42 | func (f *FlagSet) DurationVar(p *time.Duration, name string, value time.Duration, usage string) { |
| 43 | f.VarP(newDurationValue(value, p), name, "", usage) |
| 44 | } |
| 45 | |
| 46 | // DurationVarP is like DurationVar, but accepts a shorthand letter that can be used after a single dash. |
| 47 | func (f *FlagSet) DurationVarP(p *time.Duration, name, shorthand string, value time.Duration, usage string) { |
no test coverage detected