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

Closed
rui314 opened this issue Mar 23, 2014 · 5 comments
Closed

time: ParseDuration accepts questionable inputs #7615

rui314 opened this issue Mar 23, 2014 · 5 comments
Milestone

Comments

@rui314
Copy link
Member

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. http://play.golang.org/p/Ay_IEwcA7D
@ianlancetaylor
Copy link
Contributor

Comment 1:

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

Status changed to Accepted.

@gopherbot
Copy link

Comment 2:

CL https://golang.org/cl/108120045 mentions this issue.

@josharian
Copy link
Contributor

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.

@rui314
Copy link
Member Author

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.

@rui314
Copy link
Member Author

rui314 commented Sep 16, 2014

Comment 5:

Status changed to WontFix.

@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.
Projects
None yet
Development

No branches or pull requests

5 participants