Documentation ¶
Index ¶
- func Contains[T comparable](a []T, val T) bool
- func ContainsAll[T comparable](a []T, values ...T) bool
- func ContainsAny[T comparable](a []T, values ...T) bool
- func Difference[T comparable](a, b []T) []T
- func EqualSlices[T comparable](a []T, b []T) bool
- func FirstIndexOf[T comparable](a []T, val T) (int, bool)
- func OrDefault[T any](val *T) T
- func Remove[T comparable](a []T, val T) []T
- func SetToSlice[T comparable](values map[T]struct{}) []T
- func SliceToSet[T comparable](values []T) map[T]struct{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains[T comparable](a []T, val T) bool
func ContainsAll ¶
func ContainsAll[T comparable](a []T, values ...T) bool
func ContainsAny ¶
func ContainsAny[T comparable](a []T, values ...T) bool
func Difference ¶
func Difference[T comparable](a, b []T) []T
func EqualSlices ¶
func EqualSlices[T comparable](a []T, b []T) bool
func FirstIndexOf ¶
func FirstIndexOf[T comparable](a []T, val T) (int, bool)
func Remove ¶
func Remove[T comparable](a []T, val T) []T
func SetToSlice ¶
func SetToSlice[T comparable](values map[T]struct{}) []T
func SliceToSet ¶
func SliceToSet[T comparable](values []T) map[T]struct{}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.