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

doc: the Go 1.13 release notes don't mention the new “%w” verb in fmt #32914

Closed
ainar-g opened this issue Jul 3, 2019 · 5 comments
Closed
Labels
Documentation FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@ainar-g
Copy link
Contributor

ainar-g commented Jul 3, 2019

A user on Reddit has noticed that the Go 1.13 release notes don't seem to mention the %w verb for fmt.Errorf.

@bcmills bcmills added this to the Go1.13 milestone Jul 3, 2019
@bcmills bcmills added the NeedsFix The path to resolution is known, but the work has not been done. label Jul 3, 2019
@bcmills
Copy link
Contributor

bcmills commented Jul 3, 2019

@neild, @mpvl, @jba: any suggested phrasing for the release note?

@jba
Copy link
Contributor

jba commented Jul 3, 2019

Under fmt:

The Errorf function has a new verb, %w, whose operand must be an error. The error returned from Errorf will wrap the operand of %w, so that calling Unwrap will return it.

@neild
Copy link
Contributor

neild commented Jul 10, 2019

How about:

The Errorf function has a new verb, %w, whose operand must be an error. The error returned from Errorf will have an Unwrap method which returns the operand of %w.

(You can "wrap" an error without having an Unwrap method.)

@rasky
Copy link
Member

rasky commented Jul 17, 2019

As a beginner in this new error handling structure, I find jba’s phrasing much clearer.

Neild’s phrasing is confusing because people not exposed to these new APIs will not immediately understand the implications of “having a Unwrap method”. On the other hand, in jba’s phrasing, saying that the new error will “wrap” the previous one is much clearer, and the following sentence even explains what’s the goal of the Unwrap method

@gopherbot
Copy link

Change https://golang.org/cl/187797 mentions this issue: go1.13.html: release note for %w

@golang golang locked and limited conversation to collaborators Jul 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Projects
None yet
Development

No branches or pull requests

6 participants