delete map key golang code example
Example 1: go remove from map
m := map[string]string{"key1": "val1", "key2": "val2"}
delete(m, "key1")
Example 2: dictionary golang
package main
import (
"fmt"
)
func main() {
dict := map[interface{}]interface{} {
1: "hello",
"hey": 2,
}
fmt.Println(dict) // map[1:hello hey:2]
}