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