diff --git a/internal/mapper/mapper.go b/internal/mapper/mapper.go index 525ac91..52c7848 100644 --- a/internal/mapper/mapper.go +++ b/internal/mapper/mapper.go @@ -18,10 +18,15 @@ func (m Store[Key, Value]) Set(key Key, value Value) { m[key] = value } +func (m Store[Key, Value]) Delete(key Key) { + delete(m, key) +} + type Mapper interface { Get(key string) (any, bool) Has(key string) (bool) Set(key string, value any) + Delete(key string) } type Getter[Key comparable, Value comparable] interface { @@ -33,6 +38,7 @@ type Map[Key comparable, Value comparable] interface { Get(key Key) (Value, bool) Has(key Key) (bool) Set(key Key, value Value) + Delete(key Key) } func New[Key comparable, Value comparable]() Store[Key, Value] {