aboutsummaryrefslogtreecommitdiff
path: root/src/fmt
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2024-01-29 12:14:55 -0500
committerRuss Cox <rsc@golang.org>2024-01-31 14:16:48 +0000
commitb32ec6c961182e5bca6ae8420d6aa1204d7d2821 (patch)
tree003cc65c01cf53e17f1443cbf0cc6ad83113b02d /src/fmt
parenta939bb94399ce50f7ca62d546a75a226de525d27 (diff)
downloadgo-b32ec6c961182e5bca6ae8420d6aa1204d7d2821.tar.gz
go-b32ec6c961182e5bca6ae8420d6aa1204d7d2821.zip
fmt: update docs for %03s
%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 <r@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/fmt')
-rw-r--r--src/fmt/doc.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/fmt/doc.go b/src/fmt/doc.go
index 1cda484d8a..ea2da97da6 100644
--- a/src/fmt/doc.go
+++ b/src/fmt/doc.go
@@ -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