Eli Bendersky d51586e6bf Add example of the new clear() builtin for maps in 1.21
updates #481

Also bump go.mod to 1.21
2023-08-21 06:15:47 -07:00

12 lines
203 B
Bash

# Note that maps appear in the form `map[k:v k:v]` when
# printed with `fmt.Println`.
$ go run maps.go
map: map[k1:7 k2:13]
v1: 7
v3: 0
len: 2
map: map[k1:7]
map: map[]
prs: false
map: map[bar:2 foo:1]