mirror of
https://github.com/golang/go
synced 2024-09-29 19:14:28 -06:00
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>
This commit is contained in:
parent
2981fc7f16
commit
45f45444b3
@ -124,7 +124,8 @@
|
|||||||
' ' (space) leave a space for elided sign in numbers (% d);
|
' ' (space) leave a space for elided sign in numbers (% d);
|
||||||
put spaces between bytes printing strings or slices in hex (% x, % X)
|
put spaces between bytes printing strings or slices in hex (% x, % X)
|
||||||
0 pad with leading zeros rather than spaces;
|
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.
|
Flags are ignored by verbs that do not expect them.
|
||||||
For example there is no alternate decimal format, so %#d and %d
|
For example there is no alternate decimal format, so %#d and %d
|
||||||
|
Loading…
Reference in New Issue
Block a user