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-26T10:13:33Z

Updated

2019-03-26T10:13:33Z

package main

import (
	"fmt"
)

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

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