set

package
v1.31.4 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 1 Imported by: 1

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]) MarshalJSON added in v1.9.0

func (s Set[T]) MarshalJSON() ([]byte, error)

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]

func (*Set[T]) UnmarshalJSON added in v1.9.0

func (s *Set[T]) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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