Deletion of map elements The built-in function delete removes the element with key k from a map m. The value k must be assignable to the key type of m. delete(m, k) // remove element m[k] from map m We already looked at clear, which deletes everything in a map. delete lets you surgically remove individual keys from a map. Unlike some languages, which give you the means to return an element as it’s deleted, if you want to do that in Go, you’ll need to do it in two steps: