Created
March 15, 2019 19:57
-
-
Save brpaz/91d85faf98b46bb090a09ce130ec0771 to your computer and use it in GitHub Desktop.
#golang
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
if err != nil { | |
switch err.(type) { | |
case *ErrZeroDivision: | |
fmt.Println(err.Error()) | |
default: | |
fmt.Println("What the h* just happened?") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment