Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendUnique ¶ added in v0.22.0
func AppendUnique[T comparable](vs []T, toAdd T) []T
IntAppendUnique appends toAdd to the vs int slice if toAdd does not already exist in the slice. It returns the new or unchanged int slice.
func AppendUniques ¶ added in v0.22.0
func AppendUniques[T comparable](vs []T, toAdd []T) []T
IntAppendUniques appends a slice of values to the vs slice. It only appends values that do not already exist in the slice. It returns the new or unchanged slice.
func Exclude ¶ added in v0.22.0
func Exclude[T comparable](vs []T, toExclude []T) []T
Exclude removes all instances of any value in toExclude from the vs slice. It returns the new or unchanged slice.
func Include ¶ added in v0.22.0
func Include[T comparable](vs []T, t T) bool
func Index ¶ added in v0.22.0
func Index[T comparable](vs []T, t T) int
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.