]> Cypherpunks repositories - gostls13.git/commitdiff
fmt: clarify wording of * flag
authorRob Pike <r@golang.org>
Sun, 15 Oct 2017 02:47:47 +0000 (13:47 +1100)
committerRob Pike <r@golang.org>
Sun, 15 Oct 2017 06:03:34 +0000 (06:03 +0000)
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>
src/fmt/doc.go

index d1ce8c41775d1df0428a4be7321c391e50d82183..375cdb4266db63e9cf7033535d1fd9a97fdaf48c 100644 (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.