arrays

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: May 29, 2019 License: MIT Imports: 2 Imported by: 39

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(array interface{}, val interface{}) (index int)

Contains Returns the index position of the val in array

func ContainsBool

func ContainsBool(array []bool, val bool) (index int)

ContainsBool Returns the index position of the bool val in array

func ContainsComplex

func ContainsComplex(array []complex128, val complex128) (index int)

ContainsComplex Returns the index position of the complex128 val in array

func ContainsFloat

func ContainsFloat(array []float64, val float64) (index int)

ContainsFloat Returns the index position of the float64 val in array

func ContainsInt

func ContainsInt(array []int64, val int64) (index int)

ContainsInt Returns the index position of the int64 val in array

func ContainsString

func ContainsString(array []string, val string) (index int)

ContainsString Returns the index position of the string val in array

func ContainsUint

func ContainsUint(array []uint64, val uint64) (index int)

ContainsUint Returns the index position of the uint64 val in array

func IntsDeduplicate

func IntsDeduplicate(array []int) []int

[]int deduplicate

func IntsEqual

func IntsEqual(a, b []int) bool

[]int equal

func StringsContains

func StringsContains(array []string, val string) (index int)

func StringsDeduplicate

func StringsDeduplicate(array []string) []string

[]string deduplicate

func StringsEqual

func StringsEqual(a, b []string) bool

[]string equal

Types

type Set

type Set struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func MakeSet

func MakeSet(i ...interface{}) *Set

func (*Set) Add

func (s *Set) Add(item interface{})

func (*Set) Clear

func (s *Set) Clear()

func (*Set) Floats

func (s *Set) Floats() []float64

func (*Set) Has

func (s *Set) Has(item interface{}) bool

func (*Set) Ints

func (s *Set) Ints() []int64

func (*Set) IsEmpty

func (s *Set) IsEmpty() bool

func (*Set) Len

func (s *Set) Len() int

func (*Set) List

func (s *Set) List() []interface{}

func (*Set) Strings

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

Jump to

Keyboard shortcuts

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