Documentation ¶
Index ¶
- func Equal[T comparable](a, b []T) bool
- func FirstOr[T any](sl []T, elseVal T) T
- func Keys[K comparable, V any](m map[K]V) []K
- func Last[E any](s []E) (E, bool)
- func LastOr[T any](sl []T, elseVal T) T
- func Merge[T any](a []T, b []T, cc ...[]T) []T
- func NotIn[T comparable](input T, candidates []T) bool
- func OneOf[T comparable](input T, candidates []T) bool
- func StrictEqual[T cmp.Ordered](a, b []T) bool
- type Slice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Equal ¶ added in v1.0.8
func Equal[T comparable](a, b []T) bool
Equal compare two slice @notice: don't check sequence
func FirstOr ¶ added in v1.0.12
func FirstOr[T any](sl []T, elseVal T) T
FirstOr get first elem or elseVal
func Keys ¶ added in v1.0.8
func Keys[K comparable, V any](m map[K]V) []K
func LastOr ¶ added in v1.0.12
func LastOr[T any](sl []T, elseVal T) T
LastOr get last elem or elseVal
func NotIn ¶
func NotIn[T comparable](input T, candidates []T) bool
func OneOf ¶
func OneOf[T comparable](input T, candidates []T) bool
func StrictEqual ¶ added in v1.0.8
Types ¶
Click to show internal directories.
Click to hide internal directories.