Skip to content

Instantly share code, notes, and snippets.

@groz
Last active December 15, 2016 13:57
Show Gist options
  • Save groz/1ec9b9dd23c31af1845c1a88214930ad to your computer and use it in GitHub Desktop.
Save groz/1ec9b9dd23c31af1845c1a88214930ad to your computer and use it in GitHub Desktop.
Go maps and ranges
package main
import "fmt"
func main() {
m := make(map[int]int)
m[1] = 0
for k, v := range m {
m[k + k] = v
}
fmt.Println(m)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment