Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

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
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
Contributor

ianlancetaylor commented May 9, 2014

Comment 1:

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

Status changed to Accepted.

Comment 2:

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

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.
Member

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.
Member

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

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