-
Notifications
You must be signed in to change notification settings - Fork 18k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fmt: mismatch between explicit argument index documentation and behaviour #9632
Comments
“After processing a bracketed expression [n], arguments n+1, n+2, etc. will be processed unless otherwise directed.” Working as intended. |
The wording is less than entirely clear. |
Then we have: Because an explicit index affects subsequent verbs, this notation can be fmt.Sprintf("%d %d %#[1]x %#x", 16, 17) It states very clear that explicit index affects the following verbs, and What confuses you? |
What left me confused was that that final sentence does not explicitly mention that the argument cursor will be used as in the updated state (or words to that effect). I think a single clause between "processed" and "unless" making this clear would improve the explanation. |
OK. Perhaps processing is confusing here. How about changing: |
SGTM |
The documentation describing explicit argument indexes in format strings does not state that if an argument is refered to by an explicit argument index in the first place that following verbs must also have an explicit index.
Currently this gives surprising results:
http://play.golang.org/p/HP11QHqa_p
The text was updated successfully, but these errors were encountered: