mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-09 15:12:26 +08:00
doc: add go playground demo
This commit is contained in:
@@ -298,7 +298,7 @@ func MapValues[K comparable, V any, T any](m map[K]V, iteratee func(key K, value
|
||||
// fmt.Println("map has key baz")
|
||||
// }
|
||||
//
|
||||
// Play: todo
|
||||
// Play: https://go.dev/play/p/isZZHOsDhFc
|
||||
func HasKey[K comparable, V any](m map[K]V, key K) bool {
|
||||
_, haskey := m[key]
|
||||
return haskey
|
||||
|
||||
Reference in New Issue
Block a user