diff options
| author | spf13 <[email protected]> | 2014-07-11 10:25:27 -0400 |
|---|---|---|
| committer | spf13 <[email protected]> | 2014-07-11 10:25:27 -0400 |
| commit | 463bdc838f2b35e9307e91d480878bda5fff7232 (patch) | |
| tree | cb01b60a27df6601aa01c06791bec65e0c2674b4 /duration.go | |
| parent | b02196a78893a71903e9ad98359e7f891b1e7781 (diff) | |
Adding Type() method to the values.
Diffstat (limited to 'duration.go')
| -rw-r--r-- | duration.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/duration.go b/duration.go index db8bfd5..66ed7ac 100644 --- a/duration.go +++ b/duration.go @@ -16,6 +16,10 @@ func (d *durationValue) Set(s string) error { return err } +func (d *durationValue) Type() string { + return "duration" +} + func (d *durationValue) String() string { return (*time.Duration)(d).String() } // DurationVar defines a time.Duration flag with specified name, default value, and usage string. |
