]> Cypherpunks repositories - gostls13.git/commit
fmt: improve handling of zero padding
authorMartin Möhrmann <martisch@uos.de>
Sun, 27 Mar 2016 09:50:25 +0000 (11:50 +0200)
committerRob Pike <r@golang.org>
Wed, 30 Mar 2016 00:40:01 +0000 (00:40 +0000)
commitd175a85c5cef41b7f9ad8e7a9e2ebf84546a216e
tree29edd2f695c22d9ba1ae64e5b0fa927ffa29c203
parent72a1b53b674626551f03c5083dab3882e705afd1
fmt: improve handling of zero padding

Simplify the handling of zero padding in fmt_integer and
fmt_float to not require any adjustment of the format flags.

Note that f.zero can only be true when padding to the left
and f.wid is always greater than or equal to 0.

Change-Id: I204b57d103c0eac13d86995992f2b26209196925
Reviewed-on: https://go-review.googlesource.com/21185
Run-TryBot: Rob Pike <r@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
src/fmt/format.go