]> Cypherpunks repositories - gostls13.git/commit
fmt: fix formatting of numbers with f.space and f.plus specified
authorMartin Möhrmann <martisch@uos.de>
Sat, 27 Feb 2016 11:19:49 +0000 (12:19 +0100)
committerRob Pike <r@golang.org>
Mon, 29 Feb 2016 00:17:07 +0000 (00:17 +0000)
commit75cc05fa557b26336bc8e3f0a6c9f03b904a85eb
tree91afe5ae0d62646d882e0a7705a50f1c7e518dd0
parentf5ab890c189fae6f149a5621adf1cdd8016216b0
fmt: fix formatting of numbers with f.space and f.plus specified

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 <r@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
src/fmt/fmt_test.go
src/fmt/format.go