1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-18 08:32:40 +08:00
Files
go-mixed/maps/map.go
2022-05-04 23:47:24 +08:00

15 lines
256 B
Go

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))
}