1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-18 00:22:41 +08:00
This commit is contained in:
2022-05-04 23:47:24 +08:00
parent 917bad7494
commit d59666d9e6
9 changed files with 427 additions and 3 deletions

14
maps/map.go Normal file
View File

@ -0,0 +1,14 @@
package maps
import "golang.org/x/exp/constraints"
type Map[K constraints.Ordered, V any] interface {
Set(key K, value V)
Get(key K) (value V, ok bool)
Exist(key K) bool
Delete(key K)
Clone() Map[K, V]
Clear()
Count() int
ForEach(f func(K, V))
}