Created
December 24, 2013 02:43
-
-
Save comynli/8108093 to your computer and use it in GitHub Desktop.
test key existence in a map
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 := dict["key"]; ok { | |
// do some things | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment