stringset

package
v1.35.0-aplha Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 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 StringSet

type StringSet map[string]unit

StringSet helps to de-duplicate a set of strings.

func New

func New() StringSet

New returns a new StringSet object.

func (StringSet) Contains

func (s StringSet) Contains(str string) bool

Contains checks if a specified string is present in the set.

func (StringSet) Delete

func (s StringSet) Delete(str string)

Delete deletes the specified string in the set if set is nil or string is not present, its a no-op

func (StringSet) Insert

func (s StringSet) Insert(strings ...string)

Insert adds strings to the set.

func (StringSet) ToList

func (s StringSet) ToList() []string

ToList returns the sorted list of inserted strings.

Jump to

Keyboard shortcuts

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