set

package
v0.0.0-...-202a999 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StringSlice

func StringSlice(s *Set) []string

StringSlice returns a strings slice representation of all set items.

Types

type Set

type Set struct {
	// contains filtered or unexported fields
}

Set represents a set instance.

func New

func New(items ...interface{}) *Set

New creates a new set instance.

func (*Set) Add

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

Add inserts new items into the set.

func (*Set) Has

func (s *Set) Has(items ...interface{}) bool

Has returns whether or not items are present in the set.

func (*Set) Len

func (s *Set) Len() int

Len returns the number of items in the set.

func (*Set) Remove

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

Remove removes items from the set.

func (*Set) Slice

func (s *Set) Slice() []interface{}

Slice returns a slice of all set items.

Jump to

Keyboard shortcuts

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