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: incorrect handling of f.space in combination with f.plus #14543
This problem exists at least in current, go1.6, go1.4:
"% +verb" is inconsistently handled between different verbs.
I would expect a + in front of every number if f.plus is specified (compatible with c printf).
I will work on a patch and test cases to correct this.
Do not replace the sign in front of a number with a space if both f.space and f.plus are both specified for number formatting. This was already the case for integers but not for floats and complex numbers. Updates: #14543. Change-Id: I07ddeb505003db84a8a7d2c743dc19fc427a00bd Reviewed-on: https://go-review.googlesource.com/19974 Run-TryBot: Rob Pike <firstname.lastname@example.org> TryBot-Result: Gobot Gobot <email@example.com> Reviewed-by: Rob Pike <firstname.lastname@example.org>