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.
Today, Kingpin's
DurationVar()
usestime.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 usingstr2duration.ParseDuration()
from https://github.com/xhit/go-str2duration instead.