Skip to content

Instantly share code, notes, and snippets.

@reusee
Created June 20, 2020 08:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reusee/25836c8a6faac925fe52c1c73d122a04 to your computer and use it in GitHub Desktop.
Save reusee/25836c8a6faac925fe52c1c73d122a04 to your computer and use it in GitHub Desktop.
package main
func foo() (err error) {
defer func() {
if e := f.Close(); e != nil && err == nil {
err = e
}
}()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment