MCPcopy
hub / github.com/minio/minio-go / Remove

Method Remove

pkg/policy/bucket-policy-condition.go:37–47  ·  view source on GitHub ↗

Remove - removes value of given key. If key has empty after removal, the key is also removed.

(key string, value set.StringSet)

Source from the content-addressed store, hash-verified

35
36// Remove - removes value of given key. If key has empty after removal, the key is also removed.
37func (ckm ConditionKeyMap) Remove(key string, value set.StringSet) {
38 if v, ok := ckm[key]; ok {
39 if value != nil {
40 ckm[key] = v.Difference(value)
41 }
42
43 if ckm[key].IsEmpty() {
44 delete(ckm, key)
45 }
46 }
47}
48
49// RemoveKey - removes key and its value.
50func (ckm ConditionKeyMap) RemoveKey(key string) {

Callers

nothing calls this directly

Calls 2

DifferenceMethod · 0.45
IsEmptyMethod · 0.45

Tested by

no test coverage detected