Documentation
¶
Index ¶
- func Contains[T comparable](args []T, target T) bool
- func IsUnique[T comparable](args []T) bool
- func MergeMap(m1, m2 map[string]any) map[string]any
- func NextArrayValue(allValues []string, nowValue string) (string, error)
- func PluckStringByIndex(rows [][]string, index int) (r []string)
- func SliceString(all []string, start string, end string) (r []string, err error)
- func Unique[T comparable](values []T) (r []T)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains[T comparable](args []T, target T) bool
Contains checks if the specified value exists in the slice.
func IsUnique ¶
func IsUnique[T comparable](args []T) bool
IsUnique checks if the specified array contains duplicate values.
func NextArrayValue ¶
NextArrayValue returns the next value of the specified value in the array.
func PluckStringByIndex ¶
PluckStringByIndex returns an array of the specified index of the specified array.
func SliceString ¶
SliceString returns a slice of the specified array. If the start value is not specified, the first value of the array is used. If the end value is not specified, the last value of the array is used. If the end value is "next", the next value of the start value is used. If the end value is "max", the last value of the array is used.
func Unique ¶
func Unique[T comparable](values []T) (r []T)
Unique returns an array with duplicate values removed.
Types ¶
This section is empty.