Maps / Delete from a map / Essential Go
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
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)
}