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

Comments

Projects
None yet
5 participants
@rui314
Copy link
Member

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

This comment has been minimized.

Copy link
Contributor

commented May 9, 2014

Comment 1:

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

Status changed to Accepted.

@gopherbot

This comment has been minimized.

Copy link

commented Jun 22, 2014

Comment 2:

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

This comment has been minimized.

Copy link
Contributor

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.
@rui314

This comment has been minimized.

Copy link
Member Author

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

This comment has been minimized.

Copy link
Member Author

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.
You can’t perform that action at this time.