set

package
v0.0.0-...-72cce92 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add[T cmp.Ordered](set map[T]struct{}, values ...T) map[T]struct{}

Add adds the passed values to the set and returns the set. If the passed set is nil, a new set is created.

func Contains

func Contains[T cmp.Ordered](set map[T]struct{}, value T) bool

Contains returns true if the set contains the passed value.

func ContainsAll

func ContainsAll[T cmp.Ordered](set map[T]struct{}, values ...T) bool

ContainsAll returns true if the set contains all of the passed values.

func ContainsAllOther

func ContainsAllOther[T cmp.Ordered](set map[T]struct{}, other map[T]struct{}) bool

ContainsAllOther returns true if the set contains all of the values in the other set.

func ContainsAny

func ContainsAny[T cmp.Ordered](set map[T]struct{}, values ...T) bool

ContainsAny returns true if the set contains any of the passed values.

func ContainsAnyOther

func ContainsAnyOther[T cmp.Ordered](set map[T]struct{}, other map[T]struct{}) bool

ContainsAnyOther returns true if the set contains any of the values in the other set.

func New

func New[T cmp.Ordered](values ...T) map[T]struct{}

New creates a new set with the passed values.

Types

This section is empty.

Jump to

Keyboard shortcuts

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