util

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandLowercaseString

func RandLowercaseString(n int) string

RandLowercaseString returns a random string of length n

func RandString

func RandString(n int) string

RandString returns a random string of length n

Types

type StringSet added in v1.1.0

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

StringSet is a threadsafe set of strings

func NewStringSet added in v1.1.0

func NewStringSet(set []string) *StringSet

NewStringSet returns a StringSet popluated by the contents of "set"

func (*StringSet) Contains added in v1.1.0

func (s *StringSet) Contains(v string) bool

Contains returns true if the given string is contained in the StringSet

func (*StringSet) ForEach added in v1.1.0

func (s *StringSet) ForEach(f func(v string))

ForEach calls the given function for each value in the StringSet

func (*StringSet) Set added in v1.1.0

func (s *StringSet) Set(set []string)

Set replaces the values in the StringSet with the new slice of strings

Jump to

Keyboard shortcuts

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