Expand DurationVar to support days and weeks
adowair opened this issue · comments
Ali Dowair commented
Today, Kingpin's DurationVar()
uses time.ParseDuration()
to parse duration strings. Unfortunately, time.ParseDuration
does not parse durations that contain days ("d"
) or weeks ("w"
). It'd be great to expand the implementation to support them by using str2duration.ParseDuration()
from https://github.com/xhit/go-str2duration instead.