-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: error in the documentation for fmt.Formatter? #60358
Comments
This comment was marked as outdated.
This comment was marked as outdated.
CC @robpike |
Yes, it's an error. It should read "Sprint() or Fprint(f)". |
Change https://go.dev/cl/497379 mentions this issue: |
So is a call to If this was allowed before by the documentation, but not anymore, this not just a bug fix but a breaking change. |
@dolmen - what does the call |
@dolmen To be clear, calling |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
Documentation that is consistent with the intended use of
fmt.Formatter
What did you see instead?
It's unclear to me how a call to
Sprint(f)
can possibly work with with afmt.State
value.A call to
Fprint(f)
yes, but notSprint(f)
.Am I missing something obvious, or is this a mistake in the docs?
The text was updated successfully, but these errors were encountered: