MCPcopy Create free account
hub / github.com/benbjohnson/immutable / Delete

Method Delete

immutable.go:780–782  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
780func (m *Map[K, V]) Delete(key K) *Map[K, V] {
781 return m.delete(key, false)
782}
783
784func (m *Map[K, V]) delete(key K, mutable bool) *Map[K, V] {
785 // Return original map if no keys exist.

Callers

nothing calls this directly

Calls 3

deleteMethod · 0.95
assertFunction · 0.85
deleteMethod · 0.65

Tested by

no test coverage detected