Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BreakIntoGroups ¶
BreakIntoGroups breaks a slice into groups of a given size.
func ConvertSlice ¶ added in v6.8.0
ConvertSlice converts all the values in slice 'a' from type T to type K using a converter function.
converted := slices.ConvertSlice[graphql.String, string](someStruct.GraphQLStrings, func(input graphql.String) string { return string(input) })
func Filter ¶ added in v6.8.0
Filter applies the function 'test' to all values in a slice and returns a new slice for all values where 'test' returned true.
func IsInSlice ¶
func IsInSlice[T comparable](item T, slice []T) bool
IsInSlice checks if an item is in a slice. This function will work on anything that implements the comparable interface.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.