Commit e5b73357 authored by Rob Pike's avatar Rob Pike

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/71010Reviewed-by: 's avatarEmmanuel Odeke <emm.odeke@gmail.com>
parent fb46b9ea
...@@ -81,7 +81,8 @@ ...@@ -81,7 +81,8 @@
that is, runes. (This differs from C's printf where the that is, runes. (This differs from C's printf where the
units are always measured in bytes.) Either or both of the flags units are always measured in bytes.) Either or both of the flags
may be replaced with the character '*', causing their values to be 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, For most values, width is the minimum number of runes to output,
padding the formatted form with spaces if necessary. padding the formatted form with spaces if necessary.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment