Created
July 14, 2022 14:53
-
-
Save nwillc/13008ed071e971b2419c228616704714 to your computer and use it in GitHub Desktop.
Standard Go error handling pattern
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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