Skip to content

Instantly share code, notes, and snippets.

@ian-kent
Created June 7, 2015 18:35
Show Gist options
  • Save ian-kent/f3edc5652e4fd1b9900e to your computer and use it in GitHub Desktop.
Save ian-kent/f3edc5652e4fd1b9900e to your computer and use it in GitHub Desktop.
This annoys me
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