Quick actions

cmd+k|ctrl+k

Navigation

Languages

Maps / Delete from a map / Essential Go

Snippet info

Language

Go

Visibility

public

Author

kkowalczyk

Created

2019-03-11T00:39:18Z

Updated

2019-03-11T00:39:18Z

package main

import (
	"fmt"
)

func main() {
	// :show
	people := map[string]int{"john": 30, "jane": 29}
	fmt.Printf("%v\n", people)

	delete(people, "john")
	fmt.Printf("%v\n", people)
}
INFO