collections

package
v0.0.0-...-08a0563 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2017 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StringSet

type StringSet map[string]utils.Sentinel

StringSet is a Set of unique strings.

func NewStringSet

func NewStringSet(strs ...string) StringSet

NewStringSet from a list of strings.

func (StringSet) Add

func (ss StringSet) Add(strs ...string)

Add a string to this set.

func (StringSet) Contains

func (ss StringSet) Contains(str string) bool

Contains returns true if the given string is in the set.

func (StringSet) ContainsAny

func (ss StringSet) ContainsAny(strs ...string) bool

ContainsAny returns true if any of the given strings are in the set.

func (StringSet) Copy

func (ss StringSet) Copy() StringSet

Copy this StringSet to a new StringSet.

func (StringSet) Remove

func (ss StringSet) Remove(str string)

Remove a string from this set.

func (StringSet) ToArray

func (ss StringSet) ToArray() []string

ToArray converts this StringSet to a []string.

type UUIDSet

type UUIDSet map[uuid.UUID]utils.Sentinel

UUIDSet is a Set of unique UUIDs.

func (UUIDSet) Add

func (us UUIDSet) Add(uuids ...uuid.UUID)

Add a UUID to this set.

func (UUIDSet) Contains

func (us UUIDSet) Contains(id uuid.UUID) bool

Contains returns true if the given UUID is in the set.

func (UUIDSet) ContainsAny

func (us UUIDSet) ContainsAny(uuids ...uuid.UUID) bool

ContainsAny returns true if any of the given UUIDs are in the set.

func (UUIDSet) Copy

func (us UUIDSet) Copy() UUIDSet

Copy this UUIDSet to a new UUIDSet.

func (UUIDSet) Remove

func (us UUIDSet) Remove(id uuid.UUID)

Remove a UUID from this set.

func (UUIDSet) ToArray

func (us UUIDSet) ToArray() []uuid.UUID

ToArray converts this UUIDSet to a []uuid.UUID.

Jump to

Keyboard shortcuts

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