Documentation ¶
Index ¶
- func Chunk[T any](slice []T, chunkSize int) [][]T
- func ChunkMap[K comparable, V any](elements map[K]V, chunkSize int) []map[K]V
- func Column[T any, N comparable, K comparable](input map[N]map[K]T, columnKey K) []T
- func Diff[T comparable](a []T, b ...[]T) []T
- func In[T comparable](array []T, find T) bool
- func Keys[K comparable, V any](elements map[K]V) []K
- func KeysArray[V comparable](elements []V, findValue V) []int
- func KeysFind[K comparable, V comparable](elements map[K]V, findValue V) []K
- func NotIn[T comparable](array []T, find T) bool
- func ToLower(array []string) []string
- func ToUpper(array []string) []string
- func Values[K comparable, V any](elements map[K]V) []V
- type CombineNum
- type SliceWithMutex
- type Sort
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChunkMap ¶
func ChunkMap[K comparable, V any](elements map[K]V, chunkSize int) []map[K]V
ChunkMap Map分组
func Column ¶
func Column[T any, N comparable, K comparable](input map[N]map[K]T, columnKey K) []T
Column 获取Map指定column
func KeysFind ¶
func KeysFind[K comparable, V comparable](elements map[K]V, findValue V) []K
KeysFind 获取Map指定值的key
Types ¶
type CombineNum ¶
func (*CombineNum) Parse ¶
func (c *CombineNum) Parse(text string) []string
type SliceWithMutex ¶ added in v1.0.1
type SliceWithMutex[T any] struct { // contains filtered or unexported fields }
func (*SliceWithMutex[T]) Add ¶ added in v1.0.1
func (s *SliceWithMutex[T]) Add(value T)
func (*SliceWithMutex[T]) All ¶ added in v1.0.1
func (s *SliceWithMutex[T]) All() []T
func (*SliceWithMutex[T]) Get ¶ added in v1.0.1
func (s *SliceWithMutex[T]) Get(index int) T
func (*SliceWithMutex[T]) Len ¶ added in v1.0.1
func (s *SliceWithMutex[T]) Len() int
func (*SliceWithMutex[T]) Pop ¶ added in v1.0.1
func (s *SliceWithMutex[T]) Pop() []T
Click to show internal directories.
Click to hide internal directories.