aboutsummaryrefslogtreecommitdiff
path: root/src/fmt
diff options
context:
space:
mode:
authorAdam Shannon <adamkshannon@gmail.com>2022-03-02 15:05:39 -0800
committerIan Lance Taylor <iant@golang.org>2022-03-05 21:20:16 +0000
commit45f45444b307cea7c8330b100b30382e642e010f (patch)
tree7bd3c6c27ce97a2abebec8b1940690ca873667cb /src/fmt
parent2981fc7f1676ca79e487ba3c1df06e5e60723483 (diff)
downloadgo-45f45444b307cea7c8330b100b30382e642e010f.tar.gz
go-45f45444b307cea7c8330b100b30382e642e010f.zip
fmt: clarify right-padded strings use spaces
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>
Diffstat (limited to 'src/fmt')
-rw-r--r--src/fmt/doc.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fmt/doc.go b/src/fmt/doc.go
index c584cc9465..4a09555734 100644
--- a/src/fmt/doc.go
+++ b/src/fmt/doc.go
@@ -124,7 +124,8 @@
' ' (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