1
0
mirror of https://github.com/golang/go synced 2024-11-19 16:44:43 -07:00

fmt: clarify wording of * flag

The complainant is confused by the ambiguity of 'next' in the
phrase 'next operand'. It seems clear enough to me that things
are always read left to right when formatting, but to calm the
waters we add a clarifying parenthetical.

Fixes #22275

Change-Id: I82418c1e987db736f4bee0faa53fe715c9cde8f5
Reviewed-on: https://go-review.googlesource.com/71010
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
This commit is contained in:
Rob Pike 2017-10-15 13:47:47 +11:00
parent fb46b9ea20
commit e5b7335705

View File

@ -81,7 +81,8 @@
that is, runes. (This differs from C's printf where the
units are always measured in bytes.) Either or both of the flags
may be replaced with the character '*', causing their values to be
obtained from the next operand, which must be of type int.
obtained from the next operand (preceding the one to format),
which must be of type int.
For most values, width is the minimum number of runes to output,
padding the formatted form with spaces if necessary.