set

package
v0.0.0-...-640b591 Latest Latest
Warning

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

Go to latest
Published: May 22, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package set for unique collection of strings.

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 objects are collections of strings. A value in the Set may only occur once, it is unique in the Set's collection.

func (*Set) Add

func (s *Set) Add(v string) error

Add appends a new element with the given value to the Set object. It returns an error if the value already in set.

func (*Set) Clear

func (s *Set) Clear()

Clear removes all elements from the Set object.

func (*Set) Has

func (s *Set) Has(v string) (ok bool)

Has returns a boolean asserting whether an element is present with the given value in the Set object or not.

func (*Set) Values

func (s *Set) Values() (keys []string)

Values returns a new list object that contains the values for each element in the Set object.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳