collection

package
v3.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Set added in v3.5.0

type Set[T cmp.Ordered] map[T]struct{}

func NewSet added in v3.5.0

func NewSet[T cmp.Ordered](vs ...T) Set[T]

func (Set[T]) Add added in v3.5.0

func (s Set[T]) Add(v T)

func (Set[T]) AddAll added in v3.5.0

func (s Set[T]) AddAll(vs ...T) Set[T]

func (Set[T]) Contains added in v3.5.0

func (s Set[T]) Contains(v T) bool

func (Set[T]) Sorted added in v3.5.0

func (s Set[T]) Sorted() []T

Sorted returns the set as a sorted slice.

func (Set[T]) Union added in v3.5.0

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

Jump to

Keyboard shortcuts

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