Help us shape the future of Go! Take the 2026 Go Developer Survey

set

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: Apache-2.0 Imports: 0 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Set

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

func New

func New[T comparable](elems ...T) Set[T]

func (Set[T]) Add

func (s Set[T]) Add(items ...T)

func (Set[T]) Contains

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

func (Set[T]) Intersection

func (s Set[T]) Intersection(s2 Set[T]) Set[T]

func (Set[T]) Remove

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

func (Set[T]) ToSlice

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

func (Set[T]) Union

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

Jump to

Keyboard shortcuts

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