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