Set a new value on the option
(s string)
| 39 | |
| 40 | // Set a new value on the option |
| 41 | func (d *DurationOpt) Set(s string) error { |
| 42 | v, err := time.ParseDuration(s) |
| 43 | d.value = &v |
| 44 | return err |
| 45 | } |
| 46 | |
| 47 | // Type returns the type of this option, which will be displayed in `--help` output |
| 48 | func (*DurationOpt) Type() string { |
no outgoing calls