maps

package
v1.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2022 License: MulanPSL-2.0 Imports: 1 Imported by: 0

Documentation

Index

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 Exist

func Exist[KEY comparable, VALUE any](m map[KEY]VALUE, key KEY) bool

检查key是否在m中

func Keys

func Keys[KEY comparable, VALUE any](m map[KEY]VALUE) (keys []KEY)

返回一个保存m所有的key的slice

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL