collections

package
v5.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SliceContains

func SliceContains[T comparable](items []T, expectedItem T) bool

Types

type Set

type Set[T comparable] map[T]struct{}

func NewSet

func NewSet[T comparable](values []T) Set[T]

func (Set[T]) Add

func (set Set[T]) Add(value T)

func (Set[T]) AddAll

func (set Set[T]) AddAll(values []T)

func (Set[T]) Contains added in v5.12.0

func (set Set[T]) Contains(value T) bool

func (Set[T]) Copy

func (set Set[T]) Copy() Set[T]

func (Set[T]) Remove

func (set Set[T]) Remove(value T)

func (Set[T]) RemoveAll

func (set Set[T]) RemoveAll(values []T)

func (Set[T]) Union

func (set Set[T]) Union(other Set[T])

func (Set[T]) Values

func (set Set[T]) Values() []T

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL