Skip to content

Instantly share code, notes, and snippets.

@comtom
Created September 27, 2018 21:29
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 comtom/150114f9c0f57d5edf9de8af4e549bc5 to your computer and use it in GitHub Desktop.
Save comtom/150114f9c0f57d5edf9de8af4e549bc5 to your computer and use it in GitHub Desktop.
func returnsError() error {
var p *MyError = nil
if bad() {
p = ErrBad
}
return p // Will always return a non-nil error.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment