Skip to content
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: docs slightly disorganized and slightly contradictory #28509

Open
seebs opened this issue Oct 31, 2018 · 2 comments
Open

fmt: docs slightly disorganized and slightly contradictory #28509

seebs opened this issue Oct 31, 2018 · 2 comments
Labels
Documentation NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@seebs
Copy link
Contributor

seebs commented Oct 31, 2018

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

1.11

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

N/A

What did you do?

Read the fmt docs. Someone in IRC asked about padding, and I went and looked, and thought "that seems slightly inaccurate", then reread it and thought "wait that can't be right, can it?" and eventually concluded that things were confusing.

What did you expect to see?

Something I could follow without much effort.

What did you see instead?

A confusing tangle. Width and explicit argument indexes are both "immediately preceeding the verb", but actually width won't immediately preceed the verb if precision is present, or an explicit argument index for that matter. I know what width and precision are because I'm used to C, but some kind of vague conceptual introduction might be nice. Explicit argument indexes are described separately from every other aspect of the formatting verbs, after an unrelated tangle of things.

Before filing this, I decided to see if I could write something I thought was better. After some effort, I'm pleased to state that I have no idea but I have at least made an effort, so I should have a change submitted for code review "soon". (I think it's justified just by getting the explicit argument indexes moved in with the rest of the stuff.)

@ianlancetaylor
Copy link
Contributor

CC @robpike

@ianlancetaylor ianlancetaylor added the NeedsFix The path to resolution is known, but the work has not been done. label Oct 31, 2018
@ianlancetaylor ianlancetaylor added this to the Unplanned milestone Oct 31, 2018
@gopherbot
Copy link

Change https://golang.org/cl/146024 mentions this issue: fmt: Clean up and slightly restructure Printf docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants