Documentation ¶
Index ¶
- func Copy[KEY comparable, VALUE any](m map[KEY]VALUE) (nm map[KEY]VALUE)
- func Exist[KEY comparable, VALUE any](m map[KEY]VALUE, key KEY) bool
- func Keys[KEY comparable, VALUE any](m map[KEY]VALUE) (keys []KEY)
- func Like[KEY comparable, VALUE1, VALUE2 any](m1 map[KEY]VALUE1, m2 map[KEY]VALUE2) bool
- func Values[KEY comparable, VALUE any](m map[KEY]VALUE) (values []VALUE)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Copy ¶
func Copy[KEY comparable, VALUE any](m map[KEY]VALUE) (nm map[KEY]VALUE)
返回一个和m相同但是数据不共享的容器
func Like ¶
func Like[KEY comparable, VALUE1, VALUE2 any](m1 map[KEY]VALUE1, m2 map[KEY]VALUE2) bool
检查两个map是否有相同的key
func Values ¶
func Values[KEY comparable, VALUE any](m map[KEY]VALUE) (values []VALUE)
返回一个保存m所有的value的slice
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.