Last active
September 27, 2018 17:45
-
-
Save comtom/04b229c6fbac639738a8f3c8dbe25ed9 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 f1(arg int) (int, error) { | |
| if arg == 42 { | |
| return -1, errors.New("can't work with 42") | |
| } | |
| return arg + 3, nil | |
| } | |
| if rresult, err := f1(i); err != nil { | |
| fmt.Println("f1 failed:", err) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment