Remove - removes value of given key. If key has empty after removal, the key is also removed.
(key string, value set.StringSet)
| 35 | |
| 36 | // Remove - removes value of given key. If key has empty after removal, the key is also removed. |
| 37 | func (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. |
| 50 | func (ckm ConditionKeyMap) RemoveKey(key string) { |
nothing calls this directly
no test coverage detected