Quick actions

cmd+k|ctrl+k

Navigation

Languages

range statement / range over a map / Essential Go

Snippet info

Language

Go

Visibility

public

Author

kkowalczyk

Created

2019-03-26T09:41:05Z

Updated

2019-03-26T09:41:05Z

package main

import "fmt"

func main() {
	m := map[string]int{
		"three": 3,
		"five":  5,
	}
	for key := range m {
		fmt.Printf("key: %s\n", key)
	}
}
INFO