Skip to content

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

@gopherbot

Description

@gopherbot

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions