Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendUnique ¶
func AppendUnique[T comparable](slice []T, elems ...T) []T
AppendUnique appends unique elements from elems to slice, avoiding duplicates.
func Contains ¶
func Contains[T comparable](slice []T, item T) bool
Contains checks if a slice contains a specified element.
func DeleteEmpty ¶
func DeleteEmpty[T comparable](list []T) []T
DeleteEmpty removes zero-value elements from a slice.
func Remove ¶
func Remove[T comparable](slice []T, item T) []T
Remove deletes an item from a slice of elements.
func Unique ¶
func Unique[T comparable](items []T) []T
Unique returns a slice with only unique elements, preserving the order of the first occurrence.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.