collection

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(collection interface{}, target interface{}) bool

Contains 判断obj是否在collection中,collection支持的类型 array,slice,map. collection 为 map 时将根据 key 进行匹配。

func ContainsWhere

func ContainsWhere(collection interface{}, isMatch func(element interface{}) bool) bool

ContainsWhere 根据比较函数判断obj是否在collection中,collection支持的类型 array,slice,map

func FirstOrNil

func FirstOrNil(collection interface{}, isMatch func(element interface{}) bool) interface{}

Types

This section is empty.

Jump to

Keyboard shortcuts

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