strset

package
v2.1.1+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Set

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

Set holds a unique collection of strings.

func New

func New() *Set

New returns a ne and initialized Set.

func (*Set) Add

func (s *Set) Add(items ...string)

Add adds a string to the set.

func (*Set) Contains

func (s *Set) Contains(item string) bool

Contains checks if an item exits in the set.

func (*Set) ToSlice

func (s *Set) ToSlice() []string

ToSlice is used to represent the set as a slice of strings.

Jump to

Keyboard shortcuts

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