doc: "Named result parameters" section in effective_go.html is less clear than Go specification #42050
Labels
Documentation
Issues describing a change to documentation.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
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?
Run following code
What did you expect to see?
Main: explicit Goroutine: named
What did you see instead?
Main: explicit Goroutine: explicit
While I expect this is intended albeit slightly unintuitive behavior, the documentation says named results are initialized and tied to an unadorned return which presupposes that an explicit return is not tied. I humbly propose to alter the documentation to better reflect the actual behavior.
The text was updated successfully, but these errors were encountered: