Quick actions

cmd+k|ctrl+k

Navigation

Languages

Essential Go / range statement

Snippet info

Language

Go

Visibility

public

Author

kkowalczyk

Created

2019-03-26T10:01:42Z

Updated

2019-03-26T10:01:42Z

package main

import "fmt"

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