Go + has a clear function:
m := map[string]int{"a": 1, "b": 2}
clear(m) // m is now empty
In older versions, create a new map or delete all keys:
m = make(map[string]int) // replace with new map
// Or delete each key
for k := range m {
delete(m, k)
}
Replacing with a new map is usually simpler and lets the old one be garbage collected.