util

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToInterfaceSlice

func ToInterfaceSlice(slice interface{}) []interface{}

Types

type IntSet added in v0.2.13

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

IntSet the set of Ints

func NewIntSet added in v0.2.14

func NewIntSet() *IntSet

func (*IntSet) Add added in v0.2.13

func (s *IntSet) Add(t int) *IntSet

Add adds a new element to the Set. Returns a pointer to the Set.

func (*IntSet) Clear added in v0.2.13

func (s *IntSet) Clear()

Clear removes all elements from the Set

func (*IntSet) Delete added in v0.2.13

func (s *IntSet) Delete(item int) bool

Delete removes the int from the Set and returns Has(int)

func (*IntSet) Has added in v0.2.13

func (s *IntSet) Has(item int) bool

Has returns true if the Set contains the int

func (*IntSet) Ints added in v0.2.13

func (s *IntSet) Ints() []int

Ints returns the int(s) stored

func (*IntSet) Size added in v0.2.13

func (s *IntSet) Size() int

Size returns the size of the set

type StringSet added in v0.2.13

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

StringSet the set of Strings

func NewStringSet added in v0.2.14

func NewStringSet() *StringSet

func (*StringSet) Add added in v0.2.13

func (s *StringSet) Add(t string) *StringSet

Add adds a new element to the Set. Returns a pointer to the Set.

func (*StringSet) Clear added in v0.2.13

func (s *StringSet) Clear()

Clear removes all elements from the Set

func (*StringSet) Delete added in v0.2.13

func (s *StringSet) Delete(item string) bool

Delete removes the string from the Set and returns Has(string)

func (*StringSet) Has added in v0.2.13

func (s *StringSet) Has(item string) bool

Has returns true if the Set contains the string

func (*StringSet) Size added in v0.2.13

func (s *StringSet) Size() int

Size returns the size of the set

func (*StringSet) Strings added in v0.2.13

func (s *StringSet) Strings() []string

Strings returns the string(s) stored

Jump to

Keyboard shortcuts

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