Delete returns a map with the given key removed. Removing a non-existent key will cause this method to return the same map.
(key K)
| 778 | // Delete returns a map with the given key removed. |
| 779 | // Removing a non-existent key will cause this method to return the same map. |
| 780 | func (m *Map[K, V]) Delete(key K) *Map[K, V] { |
| 781 | return m.delete(key, false) |
| 782 | } |
| 783 | |
| 784 | func (m *Map[K, V]) delete(key K, mutable bool) *Map[K, V] { |
| 785 | // Return original map if no keys exist. |