From 104ee66f5930f4a37ac84538c29a291bf1d08f4f Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Tue, 24 Jan 2023 20:27:22 +0800 Subject: Use cobra as command selector --- pkg/map.go | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 pkg/map.go (limited to 'pkg/map.go') 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 +} -- cgit v1.2.3