Skip to content

Instantly share code, notes, and snippets.

@nwillc
Created July 14, 2022 14:53
Show Gist options
  • Save nwillc/13008ed071e971b2419c228616704714 to your computer and use it in GitHub Desktop.
Save nwillc/13008ed071e971b2419c228616704714 to your computer and use it in GitHub Desktop.
Standard Go error handling pattern
result, err := someFunction() // Returns a result or an error
if err != nil {
// handle error
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment