-
Notifications
You must be signed in to change notification settings - Fork 18k
time: ParseDuration does not accept types above hour on Windows #23654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm not sure where you're getting the
|
Like @bontibon said, this is working as expected. I also don't know where you got that line from - it's never been in the Go tree. |
@ivanjaros That isn't from the Go standard library. Open an issue with the 3rd-party library that you're using. |
Aaah, I see. I just followed the Flag library for the duration variable and didn't notice there are multiple implementations of ParseDuration. In the core I see that only up to hour values are supported. |
I have a duration flag and when I use any larger type than hour, it will fail.
Looking at the
var durationRE = regexp.MustCompile("^([0-9]+)(y|w|d|h|m|s|ms)$")
it should support days, weeks and years. But it will fail. I tried even 30d0h but even that won't work.
I am running Windows 10x64 and Go 1.9.2
The text was updated successfully, but these errors were encountered: