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

go_spec: missing parentheses in "Handling panics" example #1665

Closed
gopherbot opened this issue Apr 5, 2011 · 2 comments
Closed

go_spec: missing parentheses in "Handling panics" example #1665

gopherbot opened this issue Apr 5, 2011 · 2 comments

Comments

@gopherbot
Copy link
Contributor

by soggof:

There is an error in go_spec.html, Handling panics section.
In the example, argument to defer should be a function call but parentheses are missing.
This is how it should be:

func protect(g func()) {
  defer func() {
      ...
  }()
  log.Println("start")
  g()
}

Thanks
@robpike
Copy link
Contributor

robpike commented Apr 5, 2011

Comment 1:

Owner changed to @robpike.

Status changed to Started.

@robpike
Copy link
Contributor

robpike commented Apr 5, 2011

Comment 2:

This issue was closed by revision e6b1d42.

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
@rsc rsc unassigned robpike Jun 22, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants