Created
September 27, 2018 21:29
-
-
Save comtom/150114f9c0f57d5edf9de8af4e549bc5 to your computer and use it in GitHub Desktop.
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
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