diff options
author | Francis Lavoie <lavofr@gmail.com> | 2020-05-11 18:41:11 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-11 16:41:11 -0600 |
commit | ef6e53bb5f521e4d400849b79bc72e89fe2a7484 (patch) | |
tree | d1190ba7f084ec1ec8b99a6c8ea8e30ec1dfdb21 /cmd | |
parent | 35e1d92d588fadc8e5d619ffb81319dd8f7ba43a (diff) |
core: Add support for `d` duration unit (#3323)
* caddy: Add support for `d` duration unit
* Improvements to ParseDuration; add unit tests
Co-authored-by: Matthew Holt <mholt@users.noreply.github.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/main.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/main.go b/cmd/main.go index bdc95a4..fd82b96 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -311,7 +311,7 @@ func (f Flags) Float64(name string) float64 { // is not a duration type. It panics if the flag is // not in the flag set. func (f Flags) Duration(name string) time.Duration { - val, _ := time.ParseDuration(f.String(name)) + val, _ := caddy.ParseDuration(f.String(name)) return val } |