Created
June 7, 2015 18:35
-
-
Save ian-kent/f3edc5652e4fd1b9900e to your computer and use it in GitHub Desktop.
This annoys me
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 (i *inMemory) Get(key string) (interface{}, bool) { | |
// This doesn't work ("not enough arguments to return") | |
return i.data[key] | |
// But this does | |
v, ok := i.data[key] | |
return v, ok | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment