Skip to content
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

time: ParseDuration accepts questionable inputs #7615

rui314 opened this issue Mar 23, 2014 · 5 comments

time: ParseDuration accepts questionable inputs #7615

rui314 opened this issue Mar 23, 2014 · 5 comments


Copy link

@rui314 rui314 commented Mar 23, 2014

What does 'go version' print?
go version devel +2b85dda01af0 Wed Mar 19 10:14:04 2014 -0700 linux/amd64

What steps reproduce the problem?
time.ParseDuration accepts strings containing 2 or more occurrences of the same unit,
such as "3h5h" (= 8 hours). The documentation is not clear whether it's valid
or not. We might want to reject such strings.
Copy link

@ianlancetaylor ianlancetaylor commented May 9, 2014

Comment 1:

Labels changed: added repo-main, release-go1.4.

Status changed to Accepted.

Copy link

@gopherbot gopherbot commented Jun 22, 2014

Comment 2:

CL mentions this issue.
Copy link

@josharian josharian commented Sep 15, 2014

Comment 3:

I think we should do nothing here. As ruiu notes in CL 108120045, changing this might
break compatibility and the current behavior is fairly harmless. Documenting the
behavior seems like noise.
Copy link
Member Author

@rui314 rui314 commented Sep 15, 2014

Comment 4:

As the person who filed this bug, I agree with Josh that we shouldn't do anything for
it. It doesn't worth the risk to break compatibility. If there's no objection I'll close
this bug.
Copy link
Member Author

@rui314 rui314 commented Sep 16, 2014

Comment 5:

Status changed to WontFix.

@rui314 rui314 added wontfix labels Sep 16, 2014
@rsc rsc added this to the Go1.4 milestone Apr 14, 2015
@rsc rsc removed the release-go1.4 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.