]> Cypherpunks repositories - gostls13.git/commitdiff
fmt: clarify right-padded strings use spaces
authorAdam Shannon <adamkshannon@gmail.com>
Wed, 2 Mar 2022 23:05:39 +0000 (15:05 -0800)
committerIan Lance Taylor <iant@golang.org>
Sat, 5 Mar 2022 21:20:16 +0000 (21:20 +0000)
Fixes #51419

Change-Id: I0a32f41a6e6e01481ad58c7dddb57ec7085d77af
Reviewed-on: https://go-review.googlesource.com/c/go/+/389434
Reviewed-by: Rob Pike <r@golang.org>
Trust: Ian Lance Taylor <iant@golang.org>

src/fmt/doc.go

index c584cc9465e57364b27143529040d6f4dcce9434..4a095557344c0072f643f87c4c223d23271599d3 100644 (file)
                ' '     (space) leave a space for elided sign in numbers (% d);
                        put spaces between bytes printing strings or slices in hex (% x, % X)
                0       pad with leading zeros rather than spaces;
-                       for numbers, this moves the padding after the sign
+                       for numbers, this moves the padding after the sign;
+                        ignored for strings, byte slices and byte arrays
 
        Flags are ignored by verbs that do not expect them.
        For example there is no alternate decimal format, so %#d and %d