set

package
v0.0.0-...-c18a219 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 1 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 map[interface{}]struct{}

func Intersect

func Intersect(sets ...Set) Set

func NewSet

func NewSet(items ...interface{}) Set

func Union

func Union(sets ...Set) Set

func (Set) Add

func (s Set) Add(items ...interface{})

func (Set) AddSlice

func (s Set) AddSlice(slice interface{}, fn func(i int) interface{})

func (Set) Contains

func (s Set) Contains(item interface{}) bool

func (Set) Intersect

func (s Set) Intersect(set Set)

func (Set) Len

func (s Set) Len() int

func (Set) Remove

func (s Set) Remove(items ...interface{})

func (Set) RemoveSlice

func (s Set) RemoveSlice(slice interface{}, fn func(i int) string)

func (Set) Union

func (s Set) Union(set Set)

type StringSet

type StringSet map[string]struct{}

func NewStringSet

func NewStringSet(items ...string) StringSet

func (StringSet) Add

func (s StringSet) Add(items ...string)

func (StringSet) AddSlice

func (s StringSet) AddSlice(slice interface{}, fn func(i int) string)

func (StringSet) Contains

func (s StringSet) Contains(item string) bool

func (StringSet) Intersect

func (s StringSet) Intersect(set StringSet)

func (StringSet) Len

func (s StringSet) Len() int

func (StringSet) Remove

func (s StringSet) Remove(items ...string)

func (StringSet) RemoveSlice

func (s StringSet) RemoveSlice(slice interface{}, fn func(i int) string)

func (StringSet) Slice

func (s StringSet) Slice() []string

func (StringSet) Union

func (s StringSet) Union(set StringSet)

Jump to

Keyboard shortcuts

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