Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
time: ParseDuration fails to parse values consisting of multiple zeros #14209
time.ParseDuration returns an error when passed a string consisting of more than one zero but no unit: "time: missing unit in duration 00"
I'd expect this to have the same behaviour as parsing a single zero, i.e. return a duration of 0 and no error. Leading zeros are ignored as expected when the supplied string has a unit.
go version go1.5.2 linux/amd64
I just got done typing up an EBNF:
Okay. This seems like a pretty simple bug to fix. I've never submitted a Go patch before so I'll have to read all the contributor docs and whatnot first, but I'll try reading them this weekend and see how far I can get.
One question: should I also have it accept