diff options
Diffstat (limited to 'pkg/map.go')
-rw-r--r-- | pkg/map.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/map.go b/pkg/map.go new file mode 100644 index 0000000..a9f8ccb --- /dev/null +++ b/pkg/map.go @@ -0,0 +1,8 @@ +package pkg + +type Map[K comparable, V interface{}] map[K]V + +func (m Map[K, V]) Contain(key K) bool { + _, ok := m[key] + return ok +} |