Skip to content

Commit

Permalink
fmt: update docs for %03s
Browse files Browse the repository at this point in the history
%03s zero-pads a string with spaces; always has and now always will.

Fixes #56486.

Change-Id: Ia336581ae7db1c3456699e69e14a3071f50c9f2a
Reviewed-on: https://go-review.googlesource.com/c/go/+/559197
Reviewed-by: Rob Pike <[email protected]>
Reviewed-by: Michael Knyszek <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
  • Loading branch information
rsc committed Jan 31, 2024
1 parent a939bb9 commit b32ec6c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/fmt/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,11 @@ Other flags:
returns true;
always print a decimal point for %e, %E, %f, %F, %g and %G;
do not remove trailing zeros for %g and %G;
write e.g. U+0078 'x' if the character is printable for %U (%#U).
write e.g. U+0078 'x' if the character is printable for %U (%#U)
' ' (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;
ignored for strings, byte slices and byte arrays
for numbers, this moves the padding after the sign
Flags are ignored by verbs that do not expect them.
For example there is no alternate decimal format, so %#d and %d
Expand Down

0 comments on commit b32ec6c

Please sign in to comment.