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.
fmt: inconsistent padding of integers with and without f.sharp #14616
go1.4 go1.6 (see playground)
I would have expected the length of the output of %#6x and %#06x to be the same, namely 6 characters/runes as the width flag suggests.
A few places in the standard library use e.g. %#08x instead of %#.8x.
The fmt_test.go tests that fail were added to check overflow of the internal buffer.
Is it to late to make them behave the same with padding as to much code may already rely on this? Then maybe the documentation should note this deviation from normal padding behavior instead.