Created
September 20, 2021 11:50
-
-
Save JamesHovious/53cb0b361f1e97b239ee137ef13d40e9 to your computer and use it in GitHub Desktop.
Go Error Syntax Variations
This file contains 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 val, ok := data[“key”]; ok { | |
// the key/value in the map exists | |
} | |
if gz, err := zlib.NewReader(base64decoder); err != nil { | |
return err | |
} | |
if err := decoder.Decode(&t); err != nil { | |
return err | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment