Commit e12b1ddc authored by Shenghou Ma's avatar Shenghou Ma Committed by Minux Ma

fmt: reword the document for [n].

Fixes #9632.

Change-Id: Ic4d7cad8ff62023c1beecd2d62e48eb9258f5306
Reviewed-on: https://go-review.googlesource.com/3013Reviewed-by: 's avatarRob Pike <r@golang.org>
parent 3b5be452
......@@ -178,8 +178,8 @@
However, the notation [n] immediately before the verb indicates that the
nth one-indexed argument is to be formatted instead. The same notation
before a '*' for a width or precision selects the argument index holding
the value. After processing a bracketed expression [n], arguments n+1,
n+2, etc. will be processed unless otherwise directed.
the value. After processing a bracketed expression [n], subsequent verbs
will use arguments n+1, n+2, etc. unless otherwise directed.
For example,
fmt.Sprintf("%[2]d %[1]d\n", 11, 22)
......
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