collections

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SliceContains

func SliceContains[T comparable](haystack []T, needle T) bool

Types

type Errors added in v0.9.0

type Errors []error

func (Errors) Combine added in v0.9.0

func (errs Errors) Combine() error

type Set

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

func SliceToSet

func SliceToSet[T comparable](sl []T) Set[T]

func (Set[T]) Add

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

func (Set[T]) Clone added in v0.9.0

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

func (Set[T]) Contains

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

func (Set[T]) Equals added in v0.9.0

func (s Set[T]) Equals(rhs Set[T]) bool

func (Set[T]) Remove

func (s Set[T]) Remove(el T) bool

func (Set[T]) ToSlice

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

Jump to

Keyboard shortcuts

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