You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm thinking about the OS file exists test where one has to test the err to determine what type of file... or something like that, however, it would be better if the time variable was filled with whatever had been collected to that point.
What did you see instead?
the default time value.
The text was updated successfully, but these errors were encountered:
I'm not sure what to say except: you're right. If time.Parse is unable to parse the date, then it returns an error and an empty time.Time value. That is how the function has worked since it was written, and changing it now would be more likely to introduce problems rather than fix them.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
YES
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
time.Parse("Jan 2, 2006", "Dec 4, 2019 11:14:25")
https://play.golang.org/p/8RN0EnD2NMB
What did you expect to see?
I'm thinking about the OS file exists test where one has to test the err to determine what type of file... or something like that, however, it would be better if the time variable was filled with whatever had been collected to that point.
What did you see instead?
the default time value.
The text was updated successfully, but these errors were encountered: