Documentation ¶
Overview ¶
Package golist provides useful methods for working with slices of data.
Index ¶
- type SliceBool
- func (s *SliceBool) Append(elems ...bool) *SliceBool
- func (s *SliceBool) At(index int) bool
- func (s *SliceBool) Clone() *SliceBool
- func (s *SliceBool) Count() int
- func (s *SliceBool) Data() []bool
- func (s *SliceBool) Equal(s2 *SliceBool) bool
- func (s *SliceBool) Filter(fn func(elem bool) bool) *SliceBool
- func (s *SliceBool) Insert(index int, elems ...bool) *SliceBool
- func (s *SliceBool) Len() int
- func (s *SliceBool) Prepend(elems ...bool) *SliceBool
- func (s *SliceBool) Remove(index int) *SliceBool
- func (s *SliceBool) Reverse() *SliceBool
- func (s *SliceBool) Set(index int, elem bool) *SliceBool
- func (s *SliceBool) Shuffle(seed int64) *SliceBool
- func (s *SliceBool) Swap(i, j int)
- func (s *SliceBool) Transform(fn func(elem bool) bool) *SliceBool
- func (s *SliceBool) Unique() *SliceBool
- type SliceByte
- func (s *SliceByte) Append(elems ...byte) *SliceByte
- func (s *SliceByte) At(index int) byte
- func (s *SliceByte) Clone() *SliceByte
- func (s *SliceByte) Count() int
- func (s *SliceByte) Data() []byte
- func (s *SliceByte) Equal(s2 *SliceByte) bool
- func (s *SliceByte) Filter(fn func(elem byte) bool) *SliceByte
- func (s *SliceByte) Insert(index int, elems ...byte) *SliceByte
- func (s *SliceByte) Len() int
- func (s *SliceByte) Less(i, j int) bool
- func (s *SliceByte) Max() byte
- func (s *SliceByte) Min() byte
- func (s *SliceByte) Prepend(elems ...byte) *SliceByte
- func (s *SliceByte) Remove(index int) *SliceByte
- func (s *SliceByte) Reverse() *SliceByte
- func (s *SliceByte) Set(index int, elem byte) *SliceByte
- func (s *SliceByte) Shuffle(seed int64) *SliceByte
- func (s *SliceByte) Sort() *SliceByte
- func (s *SliceByte) Swap(i, j int)
- func (s *SliceByte) Transform(fn func(elem byte) byte) *SliceByte
- func (s *SliceByte) Unique() *SliceByte
- type SliceComplex128
- func (s *SliceComplex128) Append(elems ...complex128) *SliceComplex128
- func (s *SliceComplex128) At(index int) complex128
- func (s *SliceComplex128) Clone() *SliceComplex128
- func (s *SliceComplex128) Count() int
- func (s *SliceComplex128) Data() []complex128
- func (s *SliceComplex128) Equal(s2 *SliceComplex128) bool
- func (s *SliceComplex128) Filter(fn func(elem complex128) bool) *SliceComplex128
- func (s *SliceComplex128) Insert(index int, elems ...complex128) *SliceComplex128
- func (s *SliceComplex128) Len() int
- func (s *SliceComplex128) Prepend(elems ...complex128) *SliceComplex128
- func (s *SliceComplex128) Remove(index int) *SliceComplex128
- func (s *SliceComplex128) Reverse() *SliceComplex128
- func (s *SliceComplex128) Set(index int, elem complex128) *SliceComplex128
- func (s *SliceComplex128) Shuffle(seed int64) *SliceComplex128
- func (s *SliceComplex128) Swap(i, j int)
- func (s *SliceComplex128) Transform(fn func(elem complex128) complex128) *SliceComplex128
- func (s *SliceComplex128) Unique() *SliceComplex128
- type SliceComplex64
- func (s *SliceComplex64) Append(elems ...complex64) *SliceComplex64
- func (s *SliceComplex64) At(index int) complex64
- func (s *SliceComplex64) Clone() *SliceComplex64
- func (s *SliceComplex64) Count() int
- func (s *SliceComplex64) Data() []complex64
- func (s *SliceComplex64) Equal(s2 *SliceComplex64) bool
- func (s *SliceComplex64) Filter(fn func(elem complex64) bool) *SliceComplex64
- func (s *SliceComplex64) Insert(index int, elems ...complex64) *SliceComplex64
- func (s *SliceComplex64) Len() int
- func (s *SliceComplex64) Prepend(elems ...complex64) *SliceComplex64
- func (s *SliceComplex64) Remove(index int) *SliceComplex64
- func (s *SliceComplex64) Reverse() *SliceComplex64
- func (s *SliceComplex64) Set(index int, elem complex64) *SliceComplex64
- func (s *SliceComplex64) Shuffle(seed int64) *SliceComplex64
- func (s *SliceComplex64) Swap(i, j int)
- func (s *SliceComplex64) Transform(fn func(elem complex64) complex64) *SliceComplex64
- func (s *SliceComplex64) Unique() *SliceComplex64
- type SliceError
- func (s *SliceError) Append(elems ...error) *SliceError
- func (s *SliceError) At(index int) error
- func (s *SliceError) Clone() *SliceError
- func (s *SliceError) Count() int
- func (s *SliceError) Data() []error
- func (s *SliceError) Equal(s2 *SliceError) bool
- func (s *SliceError) Filter(fn func(elem error) bool) *SliceError
- func (s *SliceError) Insert(index int, elems ...error) *SliceError
- func (s *SliceError) Len() int
- func (s *SliceError) Prepend(elems ...error) *SliceError
- func (s *SliceError) Remove(index int) *SliceError
- func (s *SliceError) Reverse() *SliceError
- func (s *SliceError) Set(index int, elem error) *SliceError
- func (s *SliceError) Shuffle(seed int64) *SliceError
- func (s *SliceError) Swap(i, j int)
- func (s *SliceError) Transform(fn func(elem error) error) *SliceError
- func (s *SliceError) Unique() *SliceError
- type SliceFloat32
- func (s *SliceFloat32) Append(elems ...float32) *SliceFloat32
- func (s *SliceFloat32) At(index int) float32
- func (s *SliceFloat32) Clone() *SliceFloat32
- func (s *SliceFloat32) Count() int
- func (s *SliceFloat32) Data() []float32
- func (s *SliceFloat32) Equal(s2 *SliceFloat32) bool
- func (s *SliceFloat32) Filter(fn func(elem float32) bool) *SliceFloat32
- func (s *SliceFloat32) Insert(index int, elems ...float32) *SliceFloat32
- func (s *SliceFloat32) Len() int
- func (s *SliceFloat32) Less(i, j int) bool
- func (s *SliceFloat32) Max() float32
- func (s *SliceFloat32) Min() float32
- func (s *SliceFloat32) Prepend(elems ...float32) *SliceFloat32
- func (s *SliceFloat32) Remove(index int) *SliceFloat32
- func (s *SliceFloat32) Reverse() *SliceFloat32
- func (s *SliceFloat32) Set(index int, elem float32) *SliceFloat32
- func (s *SliceFloat32) Shuffle(seed int64) *SliceFloat32
- func (s *SliceFloat32) Sort() *SliceFloat32
- func (s *SliceFloat32) Swap(i, j int)
- func (s *SliceFloat32) Transform(fn func(elem float32) float32) *SliceFloat32
- func (s *SliceFloat32) Unique() *SliceFloat32
- type SliceFloat64
- func (s *SliceFloat64) Append(elems ...float64) *SliceFloat64
- func (s *SliceFloat64) At(index int) float64
- func (s *SliceFloat64) Clone() *SliceFloat64
- func (s *SliceFloat64) Count() int
- func (s *SliceFloat64) Data() []float64
- func (s *SliceFloat64) Equal(s2 *SliceFloat64) bool
- func (s *SliceFloat64) Filter(fn func(elem float64) bool) *SliceFloat64
- func (s *SliceFloat64) Insert(index int, elems ...float64) *SliceFloat64
- func (s *SliceFloat64) Len() int
- func (s *SliceFloat64) Less(i, j int) bool
- func (s *SliceFloat64) Max() float64
- func (s *SliceFloat64) Min() float64
- func (s *SliceFloat64) Prepend(elems ...float64) *SliceFloat64
- func (s *SliceFloat64) Remove(index int) *SliceFloat64
- func (s *SliceFloat64) Reverse() *SliceFloat64
- func (s *SliceFloat64) Set(index int, elem float64) *SliceFloat64
- func (s *SliceFloat64) Shuffle(seed int64) *SliceFloat64
- func (s *SliceFloat64) Sort() *SliceFloat64
- func (s *SliceFloat64) Swap(i, j int)
- func (s *SliceFloat64) Transform(fn func(elem float64) float64) *SliceFloat64
- func (s *SliceFloat64) Unique() *SliceFloat64
- type SliceInt
- func (s *SliceInt) Append(elems ...int) *SliceInt
- func (s *SliceInt) At(index int) int
- func (s *SliceInt) Clone() *SliceInt
- func (s *SliceInt) Count() int
- func (s *SliceInt) Data() []int
- func (s *SliceInt) Equal(s2 *SliceInt) bool
- func (s *SliceInt) Filter(fn func(elem int) bool) *SliceInt
- func (s *SliceInt) Insert(index int, elems ...int) *SliceInt
- func (s *SliceInt) Len() int
- func (s *SliceInt) Less(i, j int) bool
- func (s *SliceInt) Max() int
- func (s *SliceInt) Min() int
- func (s *SliceInt) Prepend(elems ...int) *SliceInt
- func (s *SliceInt) Remove(index int) *SliceInt
- func (s *SliceInt) Reverse() *SliceInt
- func (s *SliceInt) Set(index int, elem int) *SliceInt
- func (s *SliceInt) Shuffle(seed int64) *SliceInt
- func (s *SliceInt) Sort() *SliceInt
- func (s *SliceInt) Swap(i, j int)
- func (s *SliceInt) Transform(fn func(elem int) int) *SliceInt
- func (s *SliceInt) Unique() *SliceInt
- type SliceInt16
- func (s *SliceInt16) Append(elems ...int16) *SliceInt16
- func (s *SliceInt16) At(index int) int16
- func (s *SliceInt16) Clone() *SliceInt16
- func (s *SliceInt16) Count() int
- func (s *SliceInt16) Data() []int16
- func (s *SliceInt16) Equal(s2 *SliceInt16) bool
- func (s *SliceInt16) Filter(fn func(elem int16) bool) *SliceInt16
- func (s *SliceInt16) Insert(index int, elems ...int16) *SliceInt16
- func (s *SliceInt16) Len() int
- func (s *SliceInt16) Less(i, j int) bool
- func (s *SliceInt16) Max() int16
- func (s *SliceInt16) Min() int16
- func (s *SliceInt16) Prepend(elems ...int16) *SliceInt16
- func (s *SliceInt16) Remove(index int) *SliceInt16
- func (s *SliceInt16) Reverse() *SliceInt16
- func (s *SliceInt16) Set(index int, elem int16) *SliceInt16
- func (s *SliceInt16) Shuffle(seed int64) *SliceInt16
- func (s *SliceInt16) Sort() *SliceInt16
- func (s *SliceInt16) Swap(i, j int)
- func (s *SliceInt16) Transform(fn func(elem int16) int16) *SliceInt16
- func (s *SliceInt16) Unique() *SliceInt16
- type SliceInt32
- func (s *SliceInt32) Append(elems ...int32) *SliceInt32
- func (s *SliceInt32) At(index int) int32
- func (s *SliceInt32) Clone() *SliceInt32
- func (s *SliceInt32) Count() int
- func (s *SliceInt32) Data() []int32
- func (s *SliceInt32) Equal(s2 *SliceInt32) bool
- func (s *SliceInt32) Filter(fn func(elem int32) bool) *SliceInt32
- func (s *SliceInt32) Insert(index int, elems ...int32) *SliceInt32
- func (s *SliceInt32) Len() int
- func (s *SliceInt32) Less(i, j int) bool
- func (s *SliceInt32) Max() int32
- func (s *SliceInt32) Min() int32
- func (s *SliceInt32) Prepend(elems ...int32) *SliceInt32
- func (s *SliceInt32) Remove(index int) *SliceInt32
- func (s *SliceInt32) Reverse() *SliceInt32
- func (s *SliceInt32) Set(index int, elem int32) *SliceInt32
- func (s *SliceInt32) Shuffle(seed int64) *SliceInt32
- func (s *SliceInt32) Sort() *SliceInt32
- func (s *SliceInt32) Swap(i, j int)
- func (s *SliceInt32) Transform(fn func(elem int32) int32) *SliceInt32
- func (s *SliceInt32) Unique() *SliceInt32
- type SliceInt64
- func (s *SliceInt64) Append(elems ...int64) *SliceInt64
- func (s *SliceInt64) At(index int) int64
- func (s *SliceInt64) Clone() *SliceInt64
- func (s *SliceInt64) Count() int
- func (s *SliceInt64) Data() []int64
- func (s *SliceInt64) Equal(s2 *SliceInt64) bool
- func (s *SliceInt64) Filter(fn func(elem int64) bool) *SliceInt64
- func (s *SliceInt64) Insert(index int, elems ...int64) *SliceInt64
- func (s *SliceInt64) Len() int
- func (s *SliceInt64) Less(i, j int) bool
- func (s *SliceInt64) Max() int64
- func (s *SliceInt64) Min() int64
- func (s *SliceInt64) Prepend(elems ...int64) *SliceInt64
- func (s *SliceInt64) Remove(index int) *SliceInt64
- func (s *SliceInt64) Reverse() *SliceInt64
- func (s *SliceInt64) Set(index int, elem int64) *SliceInt64
- func (s *SliceInt64) Shuffle(seed int64) *SliceInt64
- func (s *SliceInt64) Sort() *SliceInt64
- func (s *SliceInt64) Swap(i, j int)
- func (s *SliceInt64) Transform(fn func(elem int64) int64) *SliceInt64
- func (s *SliceInt64) Unique() *SliceInt64
- type SliceInt8
- func (s *SliceInt8) Append(elems ...int8) *SliceInt8
- func (s *SliceInt8) At(index int) int8
- func (s *SliceInt8) Clone() *SliceInt8
- func (s *SliceInt8) Count() int
- func (s *SliceInt8) Data() []int8
- func (s *SliceInt8) Equal(s2 *SliceInt8) bool
- func (s *SliceInt8) Filter(fn func(elem int8) bool) *SliceInt8
- func (s *SliceInt8) Insert(index int, elems ...int8) *SliceInt8
- func (s *SliceInt8) Len() int
- func (s *SliceInt8) Less(i, j int) bool
- func (s *SliceInt8) Max() int8
- func (s *SliceInt8) Min() int8
- func (s *SliceInt8) Prepend(elems ...int8) *SliceInt8
- func (s *SliceInt8) Remove(index int) *SliceInt8
- func (s *SliceInt8) Reverse() *SliceInt8
- func (s *SliceInt8) Set(index int, elem int8) *SliceInt8
- func (s *SliceInt8) Shuffle(seed int64) *SliceInt8
- func (s *SliceInt8) Sort() *SliceInt8
- func (s *SliceInt8) Swap(i, j int)
- func (s *SliceInt8) Transform(fn func(elem int8) int8) *SliceInt8
- func (s *SliceInt8) Unique() *SliceInt8
- type SliceRune
- func (s *SliceRune) Append(elems ...rune) *SliceRune
- func (s *SliceRune) At(index int) rune
- func (s *SliceRune) Clone() *SliceRune
- func (s *SliceRune) Count() int
- func (s *SliceRune) Data() []rune
- func (s *SliceRune) Equal(s2 *SliceRune) bool
- func (s *SliceRune) Filter(fn func(elem rune) bool) *SliceRune
- func (s *SliceRune) Insert(index int, elems ...rune) *SliceRune
- func (s *SliceRune) Len() int
- func (s *SliceRune) Less(i, j int) bool
- func (s *SliceRune) Max() rune
- func (s *SliceRune) Min() rune
- func (s *SliceRune) Prepend(elems ...rune) *SliceRune
- func (s *SliceRune) Remove(index int) *SliceRune
- func (s *SliceRune) Reverse() *SliceRune
- func (s *SliceRune) Set(index int, elem rune) *SliceRune
- func (s *SliceRune) Shuffle(seed int64) *SliceRune
- func (s *SliceRune) Sort() *SliceRune
- func (s *SliceRune) Swap(i, j int)
- func (s *SliceRune) Transform(fn func(elem rune) rune) *SliceRune
- func (s *SliceRune) Unique() *SliceRune
- type SliceString
- func (s *SliceString) Append(elems ...string) *SliceString
- func (s *SliceString) At(index int) string
- func (s *SliceString) Clone() *SliceString
- func (s *SliceString) Count() int
- func (s *SliceString) Data() []string
- func (s *SliceString) Equal(s2 *SliceString) bool
- func (s *SliceString) Filter(fn func(elem string) bool) *SliceString
- func (s *SliceString) Insert(index int, elems ...string) *SliceString
- func (s *SliceString) Len() int
- func (s *SliceString) Less(i, j int) bool
- func (s *SliceString) Max() string
- func (s *SliceString) Min() string
- func (s *SliceString) Prepend(elems ...string) *SliceString
- func (s *SliceString) Remove(index int) *SliceString
- func (s *SliceString) Reverse() *SliceString
- func (s *SliceString) Set(index int, elem string) *SliceString
- func (s *SliceString) Shuffle(seed int64) *SliceString
- func (s *SliceString) Sort() *SliceString
- func (s *SliceString) Swap(i, j int)
- func (s *SliceString) Transform(fn func(elem string) string) *SliceString
- func (s *SliceString) Unique() *SliceString
- type SliceUint
- func (s *SliceUint) Append(elems ...uint) *SliceUint
- func (s *SliceUint) At(index int) uint
- func (s *SliceUint) Clone() *SliceUint
- func (s *SliceUint) Count() int
- func (s *SliceUint) Data() []uint
- func (s *SliceUint) Equal(s2 *SliceUint) bool
- func (s *SliceUint) Filter(fn func(elem uint) bool) *SliceUint
- func (s *SliceUint) Insert(index int, elems ...uint) *SliceUint
- func (s *SliceUint) Len() int
- func (s *SliceUint) Less(i, j int) bool
- func (s *SliceUint) Max() uint
- func (s *SliceUint) Min() uint
- func (s *SliceUint) Prepend(elems ...uint) *SliceUint
- func (s *SliceUint) Remove(index int) *SliceUint
- func (s *SliceUint) Reverse() *SliceUint
- func (s *SliceUint) Set(index int, elem uint) *SliceUint
- func (s *SliceUint) Shuffle(seed int64) *SliceUint
- func (s *SliceUint) Sort() *SliceUint
- func (s *SliceUint) Swap(i, j int)
- func (s *SliceUint) Transform(fn func(elem uint) uint) *SliceUint
- func (s *SliceUint) Unique() *SliceUint
- type SliceUint16
- func (s *SliceUint16) Append(elems ...uint16) *SliceUint16
- func (s *SliceUint16) At(index int) uint16
- func (s *SliceUint16) Clone() *SliceUint16
- func (s *SliceUint16) Count() int
- func (s *SliceUint16) Data() []uint16
- func (s *SliceUint16) Equal(s2 *SliceUint16) bool
- func (s *SliceUint16) Filter(fn func(elem uint16) bool) *SliceUint16
- func (s *SliceUint16) Insert(index int, elems ...uint16) *SliceUint16
- func (s *SliceUint16) Len() int
- func (s *SliceUint16) Less(i, j int) bool
- func (s *SliceUint16) Max() uint16
- func (s *SliceUint16) Min() uint16
- func (s *SliceUint16) Prepend(elems ...uint16) *SliceUint16
- func (s *SliceUint16) Remove(index int) *SliceUint16
- func (s *SliceUint16) Reverse() *SliceUint16
- func (s *SliceUint16) Set(index int, elem uint16) *SliceUint16
- func (s *SliceUint16) Shuffle(seed int64) *SliceUint16
- func (s *SliceUint16) Sort() *SliceUint16
- func (s *SliceUint16) Swap(i, j int)
- func (s *SliceUint16) Transform(fn func(elem uint16) uint16) *SliceUint16
- func (s *SliceUint16) Unique() *SliceUint16
- type SliceUint32
- func (s *SliceUint32) Append(elems ...uint32) *SliceUint32
- func (s *SliceUint32) At(index int) uint32
- func (s *SliceUint32) Clone() *SliceUint32
- func (s *SliceUint32) Count() int
- func (s *SliceUint32) Data() []uint32
- func (s *SliceUint32) Equal(s2 *SliceUint32) bool
- func (s *SliceUint32) Filter(fn func(elem uint32) bool) *SliceUint32
- func (s *SliceUint32) Insert(index int, elems ...uint32) *SliceUint32
- func (s *SliceUint32) Len() int
- func (s *SliceUint32) Less(i, j int) bool
- func (s *SliceUint32) Max() uint32
- func (s *SliceUint32) Min() uint32
- func (s *SliceUint32) Prepend(elems ...uint32) *SliceUint32
- func (s *SliceUint32) Remove(index int) *SliceUint32
- func (s *SliceUint32) Reverse() *SliceUint32
- func (s *SliceUint32) Set(index int, elem uint32) *SliceUint32
- func (s *SliceUint32) Shuffle(seed int64) *SliceUint32
- func (s *SliceUint32) Sort() *SliceUint32
- func (s *SliceUint32) Swap(i, j int)
- func (s *SliceUint32) Transform(fn func(elem uint32) uint32) *SliceUint32
- func (s *SliceUint32) Unique() *SliceUint32
- type SliceUint64
- func (s *SliceUint64) Append(elems ...uint64) *SliceUint64
- func (s *SliceUint64) At(index int) uint64
- func (s *SliceUint64) Clone() *SliceUint64
- func (s *SliceUint64) Count() int
- func (s *SliceUint64) Data() []uint64
- func (s *SliceUint64) Equal(s2 *SliceUint64) bool
- func (s *SliceUint64) Filter(fn func(elem uint64) bool) *SliceUint64
- func (s *SliceUint64) Insert(index int, elems ...uint64) *SliceUint64
- func (s *SliceUint64) Len() int
- func (s *SliceUint64) Less(i, j int) bool
- func (s *SliceUint64) Max() uint64
- func (s *SliceUint64) Min() uint64
- func (s *SliceUint64) Prepend(elems ...uint64) *SliceUint64
- func (s *SliceUint64) Remove(index int) *SliceUint64
- func (s *SliceUint64) Reverse() *SliceUint64
- func (s *SliceUint64) Set(index int, elem uint64) *SliceUint64
- func (s *SliceUint64) Shuffle(seed int64) *SliceUint64
- func (s *SliceUint64) Sort() *SliceUint64
- func (s *SliceUint64) Swap(i, j int)
- func (s *SliceUint64) Transform(fn func(elem uint64) uint64) *SliceUint64
- func (s *SliceUint64) Unique() *SliceUint64
- type SliceUint8
- func (s *SliceUint8) Append(elems ...uint8) *SliceUint8
- func (s *SliceUint8) At(index int) uint8
- func (s *SliceUint8) Clone() *SliceUint8
- func (s *SliceUint8) Count() int
- func (s *SliceUint8) Data() []uint8
- func (s *SliceUint8) Equal(s2 *SliceUint8) bool
- func (s *SliceUint8) Filter(fn func(elem uint8) bool) *SliceUint8
- func (s *SliceUint8) Insert(index int, elems ...uint8) *SliceUint8
- func (s *SliceUint8) Len() int
- func (s *SliceUint8) Less(i, j int) bool
- func (s *SliceUint8) Max() uint8
- func (s *SliceUint8) Min() uint8
- func (s *SliceUint8) Prepend(elems ...uint8) *SliceUint8
- func (s *SliceUint8) Remove(index int) *SliceUint8
- func (s *SliceUint8) Reverse() *SliceUint8
- func (s *SliceUint8) Set(index int, elem uint8) *SliceUint8
- func (s *SliceUint8) Shuffle(seed int64) *SliceUint8
- func (s *SliceUint8) Sort() *SliceUint8
- func (s *SliceUint8) Swap(i, j int)
- func (s *SliceUint8) Transform(fn func(elem uint8) uint8) *SliceUint8
- func (s *SliceUint8) Unique() *SliceUint8
- type SliceUintptr
- func (s *SliceUintptr) Append(elems ...uintptr) *SliceUintptr
- func (s *SliceUintptr) At(index int) uintptr
- func (s *SliceUintptr) Clone() *SliceUintptr
- func (s *SliceUintptr) Count() int
- func (s *SliceUintptr) Data() []uintptr
- func (s *SliceUintptr) Equal(s2 *SliceUintptr) bool
- func (s *SliceUintptr) Filter(fn func(elem uintptr) bool) *SliceUintptr
- func (s *SliceUintptr) Insert(index int, elems ...uintptr) *SliceUintptr
- func (s *SliceUintptr) Len() int
- func (s *SliceUintptr) Less(i, j int) bool
- func (s *SliceUintptr) Max() uintptr
- func (s *SliceUintptr) Min() uintptr
- func (s *SliceUintptr) Prepend(elems ...uintptr) *SliceUintptr
- func (s *SliceUintptr) Remove(index int) *SliceUintptr
- func (s *SliceUintptr) Reverse() *SliceUintptr
- func (s *SliceUintptr) Set(index int, elem uintptr) *SliceUintptr
- func (s *SliceUintptr) Shuffle(seed int64) *SliceUintptr
- func (s *SliceUintptr) Sort() *SliceUintptr
- func (s *SliceUintptr) Swap(i, j int)
- func (s *SliceUintptr) Transform(fn func(elem uintptr) uintptr) *SliceUintptr
- func (s *SliceUintptr) Unique() *SliceUintptr
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SliceBool ¶
type SliceBool struct {
// contains filtered or unexported fields
}
SliceBool is a slice of type bool.
func NewSliceBool ¶
NewSliceBool returns a pointer to a new SliceBool initialized with the specified elements.
func (*SliceBool) Equal ¶
Equal returns true if the SliceBool is logically equivalent to the specified SliceBool.
func (*SliceBool) Filter ¶
Filter removes elements from SliceBool that do not satisfy the filter function.
type SliceByte ¶
type SliceByte struct {
// contains filtered or unexported fields
}
SliceByte is a slice of type byte.
func NewSliceByte ¶
NewSliceByte returns a pointer to a new SliceByte initialized with the specified elements.
func (*SliceByte) Equal ¶
Equal returns true if the SliceByte is logically equivalent to the specified SliceByte.
func (*SliceByte) Filter ¶
Filter removes elements from SliceByte that do not satisfy the filter function.
func (*SliceByte) Less ¶
Less returns true if the SliceByte element at index i is less than the element at index j.
type SliceComplex128 ¶
type SliceComplex128 struct {
// contains filtered or unexported fields
}
SliceComplex128 is a slice of type complex128.
func NewSliceComplex128 ¶
func NewSliceComplex128(elems ...complex128) *SliceComplex128
NewSliceComplex128 returns a pointer to a new SliceComplex128 initialized with the specified elements.
func (*SliceComplex128) Append ¶
func (s *SliceComplex128) Append(elems ...complex128) *SliceComplex128
Append adds the elements to the end of SliceComplex128.
func (*SliceComplex128) At ¶
func (s *SliceComplex128) At(index int) complex128
At returns the element in SliceComplex128 at the specified index.
func (*SliceComplex128) Clone ¶
func (s *SliceComplex128) Clone() *SliceComplex128
Clone performs a deep copy of SliceComplex128 and returns it
func (*SliceComplex128) Count ¶
func (s *SliceComplex128) Count() int
Count returns the number of elements in SliceComplex128.
func (*SliceComplex128) Data ¶
func (s *SliceComplex128) Data() []complex128
Data returns the raw elements of SliceComplex128.
func (*SliceComplex128) Equal ¶
func (s *SliceComplex128) Equal(s2 *SliceComplex128) bool
Equal returns true if the SliceComplex128 is logically equivalent to the specified SliceComplex128.
func (*SliceComplex128) Filter ¶
func (s *SliceComplex128) Filter(fn func(elem complex128) bool) *SliceComplex128
Filter removes elements from SliceComplex128 that do not satisfy the filter function.
func (*SliceComplex128) Insert ¶
func (s *SliceComplex128) Insert(index int, elems ...complex128) *SliceComplex128
Insert inserts the elements into SliceComplex128 at the specified index.
func (*SliceComplex128) Len ¶
func (s *SliceComplex128) Len() int
Len returns the number of elements in SliceComplex128 (alias for Count).
func (*SliceComplex128) Prepend ¶
func (s *SliceComplex128) Prepend(elems ...complex128) *SliceComplex128
Prepend adds the elements to the beginning of SliceComplex128.
func (*SliceComplex128) Remove ¶
func (s *SliceComplex128) Remove(index int) *SliceComplex128
Remove removes the element from SliceComplex128 at the specified index.
func (*SliceComplex128) Reverse ¶
func (s *SliceComplex128) Reverse() *SliceComplex128
Reverse reverses the order of the elements of SliceComplex128.
func (*SliceComplex128) Set ¶
func (s *SliceComplex128) Set(index int, elem complex128) *SliceComplex128
Set sets the element of SliceComplex128 at the specified index.
func (*SliceComplex128) Shuffle ¶
func (s *SliceComplex128) Shuffle(seed int64) *SliceComplex128
Shuffle randomly shuffles the order of the elements in SliceComplex128.
func (*SliceComplex128) Swap ¶
func (s *SliceComplex128) Swap(i, j int)
Swap swaps the elements in SliceComplex128 specified by the indices i and j.
func (*SliceComplex128) Transform ¶
func (s *SliceComplex128) Transform(fn func(elem complex128) complex128) *SliceComplex128
Transform modifies each element of SliceComplex128 according to the specified function.
func (*SliceComplex128) Unique ¶
func (s *SliceComplex128) Unique() *SliceComplex128
Unique modifies SliceComplex128 to keep only the first occurrence of each element (removing any duplicates).
type SliceComplex64 ¶
type SliceComplex64 struct {
// contains filtered or unexported fields
}
SliceComplex64 is a slice of type complex64.
func NewSliceComplex64 ¶
func NewSliceComplex64(elems ...complex64) *SliceComplex64
NewSliceComplex64 returns a pointer to a new SliceComplex64 initialized with the specified elements.
func (*SliceComplex64) Append ¶
func (s *SliceComplex64) Append(elems ...complex64) *SliceComplex64
Append adds the elements to the end of SliceComplex64.
func (*SliceComplex64) At ¶
func (s *SliceComplex64) At(index int) complex64
At returns the element in SliceComplex64 at the specified index.
func (*SliceComplex64) Clone ¶
func (s *SliceComplex64) Clone() *SliceComplex64
Clone performs a deep copy of SliceComplex64 and returns it
func (*SliceComplex64) Count ¶
func (s *SliceComplex64) Count() int
Count returns the number of elements in SliceComplex64.
func (*SliceComplex64) Data ¶
func (s *SliceComplex64) Data() []complex64
Data returns the raw elements of SliceComplex64.
func (*SliceComplex64) Equal ¶
func (s *SliceComplex64) Equal(s2 *SliceComplex64) bool
Equal returns true if the SliceComplex64 is logically equivalent to the specified SliceComplex64.
func (*SliceComplex64) Filter ¶
func (s *SliceComplex64) Filter(fn func(elem complex64) bool) *SliceComplex64
Filter removes elements from SliceComplex64 that do not satisfy the filter function.
func (*SliceComplex64) Insert ¶
func (s *SliceComplex64) Insert(index int, elems ...complex64) *SliceComplex64
Insert inserts the elements into SliceComplex64 at the specified index.
func (*SliceComplex64) Len ¶
func (s *SliceComplex64) Len() int
Len returns the number of elements in SliceComplex64 (alias for Count).
func (*SliceComplex64) Prepend ¶
func (s *SliceComplex64) Prepend(elems ...complex64) *SliceComplex64
Prepend adds the elements to the beginning of SliceComplex64.
func (*SliceComplex64) Remove ¶
func (s *SliceComplex64) Remove(index int) *SliceComplex64
Remove removes the element from SliceComplex64 at the specified index.
func (*SliceComplex64) Reverse ¶
func (s *SliceComplex64) Reverse() *SliceComplex64
Reverse reverses the order of the elements of SliceComplex64.
func (*SliceComplex64) Set ¶
func (s *SliceComplex64) Set(index int, elem complex64) *SliceComplex64
Set sets the element of SliceComplex64 at the specified index.
func (*SliceComplex64) Shuffle ¶
func (s *SliceComplex64) Shuffle(seed int64) *SliceComplex64
Shuffle randomly shuffles the order of the elements in SliceComplex64.
func (*SliceComplex64) Swap ¶
func (s *SliceComplex64) Swap(i, j int)
Swap swaps the elements in SliceComplex64 specified by the indices i and j.
func (*SliceComplex64) Transform ¶
func (s *SliceComplex64) Transform(fn func(elem complex64) complex64) *SliceComplex64
Transform modifies each element of SliceComplex64 according to the specified function.
func (*SliceComplex64) Unique ¶
func (s *SliceComplex64) Unique() *SliceComplex64
Unique modifies SliceComplex64 to keep only the first occurrence of each element (removing any duplicates).
type SliceError ¶
type SliceError struct {
// contains filtered or unexported fields
}
SliceError is a slice of type error.
func NewSliceError ¶
func NewSliceError(elems ...error) *SliceError
NewSliceError returns a pointer to a new SliceError initialized with the specified elements.
func (*SliceError) Append ¶
func (s *SliceError) Append(elems ...error) *SliceError
Append adds the elements to the end of SliceError.
func (*SliceError) At ¶
func (s *SliceError) At(index int) error
At returns the element in SliceError at the specified index.
func (*SliceError) Clone ¶
func (s *SliceError) Clone() *SliceError
Clone performs a deep copy of SliceError and returns it
func (*SliceError) Count ¶
func (s *SliceError) Count() int
Count returns the number of elements in SliceError.
func (*SliceError) Data ¶
func (s *SliceError) Data() []error
Data returns the raw elements of SliceError.
func (*SliceError) Equal ¶
func (s *SliceError) Equal(s2 *SliceError) bool
Equal returns true if the SliceError is logically equivalent to the specified SliceError.
func (*SliceError) Filter ¶
func (s *SliceError) Filter(fn func(elem error) bool) *SliceError
Filter removes elements from SliceError that do not satisfy the filter function.
func (*SliceError) Insert ¶
func (s *SliceError) Insert(index int, elems ...error) *SliceError
Insert inserts the elements into SliceError at the specified index.
func (*SliceError) Len ¶
func (s *SliceError) Len() int
Len returns the number of elements in SliceError (alias for Count).
func (*SliceError) Prepend ¶
func (s *SliceError) Prepend(elems ...error) *SliceError
Prepend adds the elements to the beginning of SliceError.
func (*SliceError) Remove ¶
func (s *SliceError) Remove(index int) *SliceError
Remove removes the element from SliceError at the specified index.
func (*SliceError) Reverse ¶
func (s *SliceError) Reverse() *SliceError
Reverse reverses the order of the elements of SliceError.
func (*SliceError) Set ¶
func (s *SliceError) Set(index int, elem error) *SliceError
Set sets the element of SliceError at the specified index.
func (*SliceError) Shuffle ¶
func (s *SliceError) Shuffle(seed int64) *SliceError
Shuffle randomly shuffles the order of the elements in SliceError.
func (*SliceError) Swap ¶
func (s *SliceError) Swap(i, j int)
Swap swaps the elements in SliceError specified by the indices i and j.
func (*SliceError) Transform ¶
func (s *SliceError) Transform(fn func(elem error) error) *SliceError
Transform modifies each element of SliceError according to the specified function.
func (*SliceError) Unique ¶
func (s *SliceError) Unique() *SliceError
Unique modifies SliceError to keep only the first occurrence of each element (removing any duplicates).
type SliceFloat32 ¶
type SliceFloat32 struct {
// contains filtered or unexported fields
}
SliceFloat32 is a slice of type float32.
func NewSliceFloat32 ¶
func NewSliceFloat32(elems ...float32) *SliceFloat32
NewSliceFloat32 returns a pointer to a new SliceFloat32 initialized with the specified elements.
func (*SliceFloat32) Append ¶
func (s *SliceFloat32) Append(elems ...float32) *SliceFloat32
Append adds the elements to the end of SliceFloat32.
func (*SliceFloat32) At ¶
func (s *SliceFloat32) At(index int) float32
At returns the element in SliceFloat32 at the specified index.
func (*SliceFloat32) Clone ¶
func (s *SliceFloat32) Clone() *SliceFloat32
Clone performs a deep copy of SliceFloat32 and returns it
func (*SliceFloat32) Count ¶
func (s *SliceFloat32) Count() int
Count returns the number of elements in SliceFloat32.
func (*SliceFloat32) Data ¶
func (s *SliceFloat32) Data() []float32
Data returns the raw elements of SliceFloat32.
func (*SliceFloat32) Equal ¶
func (s *SliceFloat32) Equal(s2 *SliceFloat32) bool
Equal returns true if the SliceFloat32 is logically equivalent to the specified SliceFloat32.
func (*SliceFloat32) Filter ¶
func (s *SliceFloat32) Filter(fn func(elem float32) bool) *SliceFloat32
Filter removes elements from SliceFloat32 that do not satisfy the filter function.
func (*SliceFloat32) Insert ¶
func (s *SliceFloat32) Insert(index int, elems ...float32) *SliceFloat32
Insert inserts the elements into SliceFloat32 at the specified index.
func (*SliceFloat32) Len ¶
func (s *SliceFloat32) Len() int
Len returns the number of elements in SliceFloat32 (alias for Count).
func (*SliceFloat32) Less ¶
func (s *SliceFloat32) Less(i, j int) bool
Less returns true if the SliceFloat32 element at index i is less than the element at index j.
func (*SliceFloat32) Max ¶
func (s *SliceFloat32) Max() float32
Max returns the largest (greatest ordered) element in SliceFloat32.
func (*SliceFloat32) Min ¶
func (s *SliceFloat32) Min() float32
Min returns the smallest (least ordered) element in SliceFloat32.
func (*SliceFloat32) Prepend ¶
func (s *SliceFloat32) Prepend(elems ...float32) *SliceFloat32
Prepend adds the elements to the beginning of SliceFloat32.
func (*SliceFloat32) Remove ¶
func (s *SliceFloat32) Remove(index int) *SliceFloat32
Remove removes the element from SliceFloat32 at the specified index.
func (*SliceFloat32) Reverse ¶
func (s *SliceFloat32) Reverse() *SliceFloat32
Reverse reverses the order of the elements of SliceFloat32.
func (*SliceFloat32) Set ¶
func (s *SliceFloat32) Set(index int, elem float32) *SliceFloat32
Set sets the element of SliceFloat32 at the specified index.
func (*SliceFloat32) Shuffle ¶
func (s *SliceFloat32) Shuffle(seed int64) *SliceFloat32
Shuffle randomly shuffles the order of the elements in SliceFloat32.
func (*SliceFloat32) Sort ¶
func (s *SliceFloat32) Sort() *SliceFloat32
Sort sorts the elements of SliceFloat32 in increasing order.
func (*SliceFloat32) Swap ¶
func (s *SliceFloat32) Swap(i, j int)
Swap swaps the elements in SliceFloat32 specified by the indices i and j.
func (*SliceFloat32) Transform ¶
func (s *SliceFloat32) Transform(fn func(elem float32) float32) *SliceFloat32
Transform modifies each element of SliceFloat32 according to the specified function.
func (*SliceFloat32) Unique ¶
func (s *SliceFloat32) Unique() *SliceFloat32
Unique modifies SliceFloat32 to keep only the first occurrence of each element (removing any duplicates).
type SliceFloat64 ¶
type SliceFloat64 struct {
// contains filtered or unexported fields
}
SliceFloat64 is a slice of type float64.
func NewSliceFloat64 ¶
func NewSliceFloat64(elems ...float64) *SliceFloat64
NewSliceFloat64 returns a pointer to a new SliceFloat64 initialized with the specified elements.
func (*SliceFloat64) Append ¶
func (s *SliceFloat64) Append(elems ...float64) *SliceFloat64
Append adds the elements to the end of SliceFloat64.
func (*SliceFloat64) At ¶
func (s *SliceFloat64) At(index int) float64
At returns the element in SliceFloat64 at the specified index.
func (*SliceFloat64) Clone ¶
func (s *SliceFloat64) Clone() *SliceFloat64
Clone performs a deep copy of SliceFloat64 and returns it
func (*SliceFloat64) Count ¶
func (s *SliceFloat64) Count() int
Count returns the number of elements in SliceFloat64.
func (*SliceFloat64) Data ¶
func (s *SliceFloat64) Data() []float64
Data returns the raw elements of SliceFloat64.
func (*SliceFloat64) Equal ¶
func (s *SliceFloat64) Equal(s2 *SliceFloat64) bool
Equal returns true if the SliceFloat64 is logically equivalent to the specified SliceFloat64.
func (*SliceFloat64) Filter ¶
func (s *SliceFloat64) Filter(fn func(elem float64) bool) *SliceFloat64
Filter removes elements from SliceFloat64 that do not satisfy the filter function.
func (*SliceFloat64) Insert ¶
func (s *SliceFloat64) Insert(index int, elems ...float64) *SliceFloat64
Insert inserts the elements into SliceFloat64 at the specified index.
func (*SliceFloat64) Len ¶
func (s *SliceFloat64) Len() int
Len returns the number of elements in SliceFloat64 (alias for Count).
func (*SliceFloat64) Less ¶
func (s *SliceFloat64) Less(i, j int) bool
Less returns true if the SliceFloat64 element at index i is less than the element at index j.
func (*SliceFloat64) Max ¶
func (s *SliceFloat64) Max() float64
Max returns the largest (greatest ordered) element in SliceFloat64.
func (*SliceFloat64) Min ¶
func (s *SliceFloat64) Min() float64
Min returns the smallest (least ordered) element in SliceFloat64.
func (*SliceFloat64) Prepend ¶
func (s *SliceFloat64) Prepend(elems ...float64) *SliceFloat64
Prepend adds the elements to the beginning of SliceFloat64.
func (*SliceFloat64) Remove ¶
func (s *SliceFloat64) Remove(index int) *SliceFloat64
Remove removes the element from SliceFloat64 at the specified index.
func (*SliceFloat64) Reverse ¶
func (s *SliceFloat64) Reverse() *SliceFloat64
Reverse reverses the order of the elements of SliceFloat64.
func (*SliceFloat64) Set ¶
func (s *SliceFloat64) Set(index int, elem float64) *SliceFloat64
Set sets the element of SliceFloat64 at the specified index.
func (*SliceFloat64) Shuffle ¶
func (s *SliceFloat64) Shuffle(seed int64) *SliceFloat64
Shuffle randomly shuffles the order of the elements in SliceFloat64.
func (*SliceFloat64) Sort ¶
func (s *SliceFloat64) Sort() *SliceFloat64
Sort sorts the elements of SliceFloat64 in increasing order.
func (*SliceFloat64) Swap ¶
func (s *SliceFloat64) Swap(i, j int)
Swap swaps the elements in SliceFloat64 specified by the indices i and j.
func (*SliceFloat64) Transform ¶
func (s *SliceFloat64) Transform(fn func(elem float64) float64) *SliceFloat64
Transform modifies each element of SliceFloat64 according to the specified function.
func (*SliceFloat64) Unique ¶
func (s *SliceFloat64) Unique() *SliceFloat64
Unique modifies SliceFloat64 to keep only the first occurrence of each element (removing any duplicates).
type SliceInt ¶
type SliceInt struct {
// contains filtered or unexported fields
}
SliceInt is a slice of type int.
func NewSliceInt ¶
NewSliceInt returns a pointer to a new SliceInt initialized with the specified elements.
func (*SliceInt) Count ¶
Count returns the number of elements in SliceInt.
Example ¶
package main import ( "fmt" "github.com/schoukri/golist" ) func main() { s := golist.NewSliceInt(-5, 3, 2, 21, 0, 40, -4, -20, 100, 40, -9, 18, 21, -33, 40) count := s.Filter(func(a int) bool { return a > 10 }).Count() uniqCount := s.Filter(func(a int) bool { return a > 10 }).Unique().Count() fmt.Println("total count:", count) fmt.Println("unique count:", uniqCount) }
Output: total count: 7 unique count: 4
func (*SliceInt) Equal ¶
Equal returns true if the SliceInt is logically equivalent to the specified SliceInt.
func (*SliceInt) Filter ¶
Filter removes elements from SliceInt that do not satisfy the filter function.
func (*SliceInt) Insert ¶
Insert inserts the elements into SliceInt at the specified index.
Example ¶
package main import ( "fmt" "github.com/schoukri/golist" ) func main() { s := golist.NewSliceInt(10, 40) s.Insert(1, 20, 30) for _, value := range s.Data() { fmt.Println(value) } }
Output: 10 20 30 40
func (*SliceInt) Less ¶
Less returns true if the SliceInt element at index i is less than the element at index j.
func (*SliceInt) Transform ¶
Transform modifies each element of SliceInt according to the specified function.
Example ¶
package main import ( "fmt" "github.com/schoukri/golist" ) func main() { s := golist.NewSliceInt(-5, 3, 2, 21, 0, 40, -4, -20, 100, 40, -9, 18, 21, -33, 40) s.Transform(func(a int) int { return a * 2 }).Filter(func(a int) bool { return a > 20 }).Unique().Sort() for _, value := range s.Data() { fmt.Println(value) } }
Output: 36 42 80 200
type SliceInt16 ¶
type SliceInt16 struct {
// contains filtered or unexported fields
}
SliceInt16 is a slice of type int16.
func NewSliceInt16 ¶
func NewSliceInt16(elems ...int16) *SliceInt16
NewSliceInt16 returns a pointer to a new SliceInt16 initialized with the specified elements.
func (*SliceInt16) Append ¶
func (s *SliceInt16) Append(elems ...int16) *SliceInt16
Append adds the elements to the end of SliceInt16.
func (*SliceInt16) At ¶
func (s *SliceInt16) At(index int) int16
At returns the element in SliceInt16 at the specified index.
func (*SliceInt16) Clone ¶
func (s *SliceInt16) Clone() *SliceInt16
Clone performs a deep copy of SliceInt16 and returns it
func (*SliceInt16) Count ¶
func (s *SliceInt16) Count() int
Count returns the number of elements in SliceInt16.
func (*SliceInt16) Data ¶
func (s *SliceInt16) Data() []int16
Data returns the raw elements of SliceInt16.
func (*SliceInt16) Equal ¶
func (s *SliceInt16) Equal(s2 *SliceInt16) bool
Equal returns true if the SliceInt16 is logically equivalent to the specified SliceInt16.
func (*SliceInt16) Filter ¶
func (s *SliceInt16) Filter(fn func(elem int16) bool) *SliceInt16
Filter removes elements from SliceInt16 that do not satisfy the filter function.
func (*SliceInt16) Insert ¶
func (s *SliceInt16) Insert(index int, elems ...int16) *SliceInt16
Insert inserts the elements into SliceInt16 at the specified index.
func (*SliceInt16) Len ¶
func (s *SliceInt16) Len() int
Len returns the number of elements in SliceInt16 (alias for Count).
func (*SliceInt16) Less ¶
func (s *SliceInt16) Less(i, j int) bool
Less returns true if the SliceInt16 element at index i is less than the element at index j.
func (*SliceInt16) Max ¶
func (s *SliceInt16) Max() int16
Max returns the largest (greatest ordered) element in SliceInt16.
func (*SliceInt16) Min ¶
func (s *SliceInt16) Min() int16
Min returns the smallest (least ordered) element in SliceInt16.
func (*SliceInt16) Prepend ¶
func (s *SliceInt16) Prepend(elems ...int16) *SliceInt16
Prepend adds the elements to the beginning of SliceInt16.
func (*SliceInt16) Remove ¶
func (s *SliceInt16) Remove(index int) *SliceInt16
Remove removes the element from SliceInt16 at the specified index.
func (*SliceInt16) Reverse ¶
func (s *SliceInt16) Reverse() *SliceInt16
Reverse reverses the order of the elements of SliceInt16.
func (*SliceInt16) Set ¶
func (s *SliceInt16) Set(index int, elem int16) *SliceInt16
Set sets the element of SliceInt16 at the specified index.
func (*SliceInt16) Shuffle ¶
func (s *SliceInt16) Shuffle(seed int64) *SliceInt16
Shuffle randomly shuffles the order of the elements in SliceInt16.
func (*SliceInt16) Sort ¶
func (s *SliceInt16) Sort() *SliceInt16
Sort sorts the elements of SliceInt16 in increasing order.
func (*SliceInt16) Swap ¶
func (s *SliceInt16) Swap(i, j int)
Swap swaps the elements in SliceInt16 specified by the indices i and j.
func (*SliceInt16) Transform ¶
func (s *SliceInt16) Transform(fn func(elem int16) int16) *SliceInt16
Transform modifies each element of SliceInt16 according to the specified function.
func (*SliceInt16) Unique ¶
func (s *SliceInt16) Unique() *SliceInt16
Unique modifies SliceInt16 to keep only the first occurrence of each element (removing any duplicates).
type SliceInt32 ¶
type SliceInt32 struct {
// contains filtered or unexported fields
}
SliceInt32 is a slice of type int32.
func NewSliceInt32 ¶
func NewSliceInt32(elems ...int32) *SliceInt32
NewSliceInt32 returns a pointer to a new SliceInt32 initialized with the specified elements.
func (*SliceInt32) Append ¶
func (s *SliceInt32) Append(elems ...int32) *SliceInt32
Append adds the elements to the end of SliceInt32.
func (*SliceInt32) At ¶
func (s *SliceInt32) At(index int) int32
At returns the element in SliceInt32 at the specified index.
func (*SliceInt32) Clone ¶
func (s *SliceInt32) Clone() *SliceInt32
Clone performs a deep copy of SliceInt32 and returns it
func (*SliceInt32) Count ¶
func (s *SliceInt32) Count() int
Count returns the number of elements in SliceInt32.
func (*SliceInt32) Data ¶
func (s *SliceInt32) Data() []int32
Data returns the raw elements of SliceInt32.
func (*SliceInt32) Equal ¶
func (s *SliceInt32) Equal(s2 *SliceInt32) bool
Equal returns true if the SliceInt32 is logically equivalent to the specified SliceInt32.
func (*SliceInt32) Filter ¶
func (s *SliceInt32) Filter(fn func(elem int32) bool) *SliceInt32
Filter removes elements from SliceInt32 that do not satisfy the filter function.
func (*SliceInt32) Insert ¶
func (s *SliceInt32) Insert(index int, elems ...int32) *SliceInt32
Insert inserts the elements into SliceInt32 at the specified index.
func (*SliceInt32) Len ¶
func (s *SliceInt32) Len() int
Len returns the number of elements in SliceInt32 (alias for Count).
func (*SliceInt32) Less ¶
func (s *SliceInt32) Less(i, j int) bool
Less returns true if the SliceInt32 element at index i is less than the element at index j.
func (*SliceInt32) Max ¶
func (s *SliceInt32) Max() int32
Max returns the largest (greatest ordered) element in SliceInt32.
func (*SliceInt32) Min ¶
func (s *SliceInt32) Min() int32
Min returns the smallest (least ordered) element in SliceInt32.
func (*SliceInt32) Prepend ¶
func (s *SliceInt32) Prepend(elems ...int32) *SliceInt32
Prepend adds the elements to the beginning of SliceInt32.
func (*SliceInt32) Remove ¶
func (s *SliceInt32) Remove(index int) *SliceInt32
Remove removes the element from SliceInt32 at the specified index.
func (*SliceInt32) Reverse ¶
func (s *SliceInt32) Reverse() *SliceInt32
Reverse reverses the order of the elements of SliceInt32.
func (*SliceInt32) Set ¶
func (s *SliceInt32) Set(index int, elem int32) *SliceInt32
Set sets the element of SliceInt32 at the specified index.
func (*SliceInt32) Shuffle ¶
func (s *SliceInt32) Shuffle(seed int64) *SliceInt32
Shuffle randomly shuffles the order of the elements in SliceInt32.
func (*SliceInt32) Sort ¶
func (s *SliceInt32) Sort() *SliceInt32
Sort sorts the elements of SliceInt32 in increasing order.
func (*SliceInt32) Swap ¶
func (s *SliceInt32) Swap(i, j int)
Swap swaps the elements in SliceInt32 specified by the indices i and j.
func (*SliceInt32) Transform ¶
func (s *SliceInt32) Transform(fn func(elem int32) int32) *SliceInt32
Transform modifies each element of SliceInt32 according to the specified function.
func (*SliceInt32) Unique ¶
func (s *SliceInt32) Unique() *SliceInt32
Unique modifies SliceInt32 to keep only the first occurrence of each element (removing any duplicates).
type SliceInt64 ¶
type SliceInt64 struct {
// contains filtered or unexported fields
}
SliceInt64 is a slice of type int64.
func NewSliceInt64 ¶
func NewSliceInt64(elems ...int64) *SliceInt64
NewSliceInt64 returns a pointer to a new SliceInt64 initialized with the specified elements.
func (*SliceInt64) Append ¶
func (s *SliceInt64) Append(elems ...int64) *SliceInt64
Append adds the elements to the end of SliceInt64.
func (*SliceInt64) At ¶
func (s *SliceInt64) At(index int) int64
At returns the element in SliceInt64 at the specified index.
func (*SliceInt64) Clone ¶
func (s *SliceInt64) Clone() *SliceInt64
Clone performs a deep copy of SliceInt64 and returns it
func (*SliceInt64) Count ¶
func (s *SliceInt64) Count() int
Count returns the number of elements in SliceInt64.
func (*SliceInt64) Data ¶
func (s *SliceInt64) Data() []int64
Data returns the raw elements of SliceInt64.
func (*SliceInt64) Equal ¶
func (s *SliceInt64) Equal(s2 *SliceInt64) bool
Equal returns true if the SliceInt64 is logically equivalent to the specified SliceInt64.
func (*SliceInt64) Filter ¶
func (s *SliceInt64) Filter(fn func(elem int64) bool) *SliceInt64
Filter removes elements from SliceInt64 that do not satisfy the filter function.
func (*SliceInt64) Insert ¶
func (s *SliceInt64) Insert(index int, elems ...int64) *SliceInt64
Insert inserts the elements into SliceInt64 at the specified index.
func (*SliceInt64) Len ¶
func (s *SliceInt64) Len() int
Len returns the number of elements in SliceInt64 (alias for Count).
func (*SliceInt64) Less ¶
func (s *SliceInt64) Less(i, j int) bool
Less returns true if the SliceInt64 element at index i is less than the element at index j.
func (*SliceInt64) Max ¶
func (s *SliceInt64) Max() int64
Max returns the largest (greatest ordered) element in SliceInt64.
func (*SliceInt64) Min ¶
func (s *SliceInt64) Min() int64
Min returns the smallest (least ordered) element in SliceInt64.
func (*SliceInt64) Prepend ¶
func (s *SliceInt64) Prepend(elems ...int64) *SliceInt64
Prepend adds the elements to the beginning of SliceInt64.
func (*SliceInt64) Remove ¶
func (s *SliceInt64) Remove(index int) *SliceInt64
Remove removes the element from SliceInt64 at the specified index.
func (*SliceInt64) Reverse ¶
func (s *SliceInt64) Reverse() *SliceInt64
Reverse reverses the order of the elements of SliceInt64.
func (*SliceInt64) Set ¶
func (s *SliceInt64) Set(index int, elem int64) *SliceInt64
Set sets the element of SliceInt64 at the specified index.
func (*SliceInt64) Shuffle ¶
func (s *SliceInt64) Shuffle(seed int64) *SliceInt64
Shuffle randomly shuffles the order of the elements in SliceInt64.
func (*SliceInt64) Sort ¶
func (s *SliceInt64) Sort() *SliceInt64
Sort sorts the elements of SliceInt64 in increasing order.
func (*SliceInt64) Swap ¶
func (s *SliceInt64) Swap(i, j int)
Swap swaps the elements in SliceInt64 specified by the indices i and j.
func (*SliceInt64) Transform ¶
func (s *SliceInt64) Transform(fn func(elem int64) int64) *SliceInt64
Transform modifies each element of SliceInt64 according to the specified function.
func (*SliceInt64) Unique ¶
func (s *SliceInt64) Unique() *SliceInt64
Unique modifies SliceInt64 to keep only the first occurrence of each element (removing any duplicates).
type SliceInt8 ¶
type SliceInt8 struct {
// contains filtered or unexported fields
}
SliceInt8 is a slice of type int8.
func NewSliceInt8 ¶
NewSliceInt8 returns a pointer to a new SliceInt8 initialized with the specified elements.
func (*SliceInt8) Equal ¶
Equal returns true if the SliceInt8 is logically equivalent to the specified SliceInt8.
func (*SliceInt8) Filter ¶
Filter removes elements from SliceInt8 that do not satisfy the filter function.
func (*SliceInt8) Less ¶
Less returns true if the SliceInt8 element at index i is less than the element at index j.
type SliceRune ¶
type SliceRune struct {
// contains filtered or unexported fields
}
SliceRune is a slice of type rune.
func NewSliceRune ¶
NewSliceRune returns a pointer to a new SliceRune initialized with the specified elements.
func (*SliceRune) Equal ¶
Equal returns true if the SliceRune is logically equivalent to the specified SliceRune.
func (*SliceRune) Filter ¶
Filter removes elements from SliceRune that do not satisfy the filter function.
func (*SliceRune) Less ¶
Less returns true if the SliceRune element at index i is less than the element at index j.
type SliceString ¶
type SliceString struct {
// contains filtered or unexported fields
}
SliceString is a slice of type string.
func NewSliceString ¶
func NewSliceString(elems ...string) *SliceString
NewSliceString returns a pointer to a new SliceString initialized with the specified elements.
func (*SliceString) Append ¶
func (s *SliceString) Append(elems ...string) *SliceString
Append adds the elements to the end of SliceString.
func (*SliceString) At ¶
func (s *SliceString) At(index int) string
At returns the element in SliceString at the specified index.
func (*SliceString) Clone ¶
func (s *SliceString) Clone() *SliceString
Clone performs a deep copy of SliceString and returns it
func (*SliceString) Count ¶
func (s *SliceString) Count() int
Count returns the number of elements in SliceString.
func (*SliceString) Data ¶
func (s *SliceString) Data() []string
Data returns the raw elements of SliceString.
func (*SliceString) Equal ¶
func (s *SliceString) Equal(s2 *SliceString) bool
Equal returns true if the SliceString is logically equivalent to the specified SliceString.
func (*SliceString) Filter ¶
func (s *SliceString) Filter(fn func(elem string) bool) *SliceString
Filter removes elements from SliceString that do not satisfy the filter function.
func (*SliceString) Insert ¶
func (s *SliceString) Insert(index int, elems ...string) *SliceString
Insert inserts the elements into SliceString at the specified index.
func (*SliceString) Len ¶
func (s *SliceString) Len() int
Len returns the number of elements in SliceString (alias for Count).
func (*SliceString) Less ¶
func (s *SliceString) Less(i, j int) bool
Less returns true if the SliceString element at index i is less than the element at index j.
func (*SliceString) Max ¶
func (s *SliceString) Max() string
Max returns the largest (greatest ordered) element in SliceString.
func (*SliceString) Min ¶
func (s *SliceString) Min() string
Min returns the smallest (least ordered) element in SliceString.
func (*SliceString) Prepend ¶
func (s *SliceString) Prepend(elems ...string) *SliceString
Prepend adds the elements to the beginning of SliceString.
func (*SliceString) Remove ¶
func (s *SliceString) Remove(index int) *SliceString
Remove removes the element from SliceString at the specified index.
func (*SliceString) Reverse ¶
func (s *SliceString) Reverse() *SliceString
Reverse reverses the order of the elements of SliceString.
func (*SliceString) Set ¶
func (s *SliceString) Set(index int, elem string) *SliceString
Set sets the element of SliceString at the specified index.
func (*SliceString) Shuffle ¶
func (s *SliceString) Shuffle(seed int64) *SliceString
Shuffle randomly shuffles the order of the elements in SliceString.
func (*SliceString) Sort ¶
func (s *SliceString) Sort() *SliceString
Sort sorts the elements of SliceString in increasing order.
func (*SliceString) Swap ¶
func (s *SliceString) Swap(i, j int)
Swap swaps the elements in SliceString specified by the indices i and j.
func (*SliceString) Transform ¶
func (s *SliceString) Transform(fn func(elem string) string) *SliceString
Transform modifies each element of SliceString according to the specified function.
func (*SliceString) Unique ¶
func (s *SliceString) Unique() *SliceString
Unique modifies SliceString to keep only the first occurrence of each element (removing any duplicates).
type SliceUint ¶
type SliceUint struct {
// contains filtered or unexported fields
}
SliceUint is a slice of type uint.
func NewSliceUint ¶
NewSliceUint returns a pointer to a new SliceUint initialized with the specified elements.
func (*SliceUint) Equal ¶
Equal returns true if the SliceUint is logically equivalent to the specified SliceUint.
func (*SliceUint) Filter ¶
Filter removes elements from SliceUint that do not satisfy the filter function.
func (*SliceUint) Less ¶
Less returns true if the SliceUint element at index i is less than the element at index j.
type SliceUint16 ¶
type SliceUint16 struct {
// contains filtered or unexported fields
}
SliceUint16 is a slice of type uint16.
func NewSliceUint16 ¶
func NewSliceUint16(elems ...uint16) *SliceUint16
NewSliceUint16 returns a pointer to a new SliceUint16 initialized with the specified elements.
func (*SliceUint16) Append ¶
func (s *SliceUint16) Append(elems ...uint16) *SliceUint16
Append adds the elements to the end of SliceUint16.
func (*SliceUint16) At ¶
func (s *SliceUint16) At(index int) uint16
At returns the element in SliceUint16 at the specified index.
func (*SliceUint16) Clone ¶
func (s *SliceUint16) Clone() *SliceUint16
Clone performs a deep copy of SliceUint16 and returns it
func (*SliceUint16) Count ¶
func (s *SliceUint16) Count() int
Count returns the number of elements in SliceUint16.
func (*SliceUint16) Data ¶
func (s *SliceUint16) Data() []uint16
Data returns the raw elements of SliceUint16.
func (*SliceUint16) Equal ¶
func (s *SliceUint16) Equal(s2 *SliceUint16) bool
Equal returns true if the SliceUint16 is logically equivalent to the specified SliceUint16.
func (*SliceUint16) Filter ¶
func (s *SliceUint16) Filter(fn func(elem uint16) bool) *SliceUint16
Filter removes elements from SliceUint16 that do not satisfy the filter function.
func (*SliceUint16) Insert ¶
func (s *SliceUint16) Insert(index int, elems ...uint16) *SliceUint16
Insert inserts the elements into SliceUint16 at the specified index.
func (*SliceUint16) Len ¶
func (s *SliceUint16) Len() int
Len returns the number of elements in SliceUint16 (alias for Count).
func (*SliceUint16) Less ¶
func (s *SliceUint16) Less(i, j int) bool
Less returns true if the SliceUint16 element at index i is less than the element at index j.
func (*SliceUint16) Max ¶
func (s *SliceUint16) Max() uint16
Max returns the largest (greatest ordered) element in SliceUint16.
func (*SliceUint16) Min ¶
func (s *SliceUint16) Min() uint16
Min returns the smallest (least ordered) element in SliceUint16.
func (*SliceUint16) Prepend ¶
func (s *SliceUint16) Prepend(elems ...uint16) *SliceUint16
Prepend adds the elements to the beginning of SliceUint16.
func (*SliceUint16) Remove ¶
func (s *SliceUint16) Remove(index int) *SliceUint16
Remove removes the element from SliceUint16 at the specified index.
func (*SliceUint16) Reverse ¶
func (s *SliceUint16) Reverse() *SliceUint16
Reverse reverses the order of the elements of SliceUint16.
func (*SliceUint16) Set ¶
func (s *SliceUint16) Set(index int, elem uint16) *SliceUint16
Set sets the element of SliceUint16 at the specified index.
func (*SliceUint16) Shuffle ¶
func (s *SliceUint16) Shuffle(seed int64) *SliceUint16
Shuffle randomly shuffles the order of the elements in SliceUint16.
func (*SliceUint16) Sort ¶
func (s *SliceUint16) Sort() *SliceUint16
Sort sorts the elements of SliceUint16 in increasing order.
func (*SliceUint16) Swap ¶
func (s *SliceUint16) Swap(i, j int)
Swap swaps the elements in SliceUint16 specified by the indices i and j.
func (*SliceUint16) Transform ¶
func (s *SliceUint16) Transform(fn func(elem uint16) uint16) *SliceUint16
Transform modifies each element of SliceUint16 according to the specified function.
func (*SliceUint16) Unique ¶
func (s *SliceUint16) Unique() *SliceUint16
Unique modifies SliceUint16 to keep only the first occurrence of each element (removing any duplicates).
type SliceUint32 ¶
type SliceUint32 struct {
// contains filtered or unexported fields
}
SliceUint32 is a slice of type uint32.
func NewSliceUint32 ¶
func NewSliceUint32(elems ...uint32) *SliceUint32
NewSliceUint32 returns a pointer to a new SliceUint32 initialized with the specified elements.
func (*SliceUint32) Append ¶
func (s *SliceUint32) Append(elems ...uint32) *SliceUint32
Append adds the elements to the end of SliceUint32.
func (*SliceUint32) At ¶
func (s *SliceUint32) At(index int) uint32
At returns the element in SliceUint32 at the specified index.
func (*SliceUint32) Clone ¶
func (s *SliceUint32) Clone() *SliceUint32
Clone performs a deep copy of SliceUint32 and returns it
func (*SliceUint32) Count ¶
func (s *SliceUint32) Count() int
Count returns the number of elements in SliceUint32.
func (*SliceUint32) Data ¶
func (s *SliceUint32) Data() []uint32
Data returns the raw elements of SliceUint32.
func (*SliceUint32) Equal ¶
func (s *SliceUint32) Equal(s2 *SliceUint32) bool
Equal returns true if the SliceUint32 is logically equivalent to the specified SliceUint32.
func (*SliceUint32) Filter ¶
func (s *SliceUint32) Filter(fn func(elem uint32) bool) *SliceUint32
Filter removes elements from SliceUint32 that do not satisfy the filter function.
func (*SliceUint32) Insert ¶
func (s *SliceUint32) Insert(index int, elems ...uint32) *SliceUint32
Insert inserts the elements into SliceUint32 at the specified index.
func (*SliceUint32) Len ¶
func (s *SliceUint32) Len() int
Len returns the number of elements in SliceUint32 (alias for Count).
func (*SliceUint32) Less ¶
func (s *SliceUint32) Less(i, j int) bool
Less returns true if the SliceUint32 element at index i is less than the element at index j.
func (*SliceUint32) Max ¶
func (s *SliceUint32) Max() uint32
Max returns the largest (greatest ordered) element in SliceUint32.
func (*SliceUint32) Min ¶
func (s *SliceUint32) Min() uint32
Min returns the smallest (least ordered) element in SliceUint32.
func (*SliceUint32) Prepend ¶
func (s *SliceUint32) Prepend(elems ...uint32) *SliceUint32
Prepend adds the elements to the beginning of SliceUint32.
func (*SliceUint32) Remove ¶
func (s *SliceUint32) Remove(index int) *SliceUint32
Remove removes the element from SliceUint32 at the specified index.
func (*SliceUint32) Reverse ¶
func (s *SliceUint32) Reverse() *SliceUint32
Reverse reverses the order of the elements of SliceUint32.
func (*SliceUint32) Set ¶
func (s *SliceUint32) Set(index int, elem uint32) *SliceUint32
Set sets the element of SliceUint32 at the specified index.
func (*SliceUint32) Shuffle ¶
func (s *SliceUint32) Shuffle(seed int64) *SliceUint32
Shuffle randomly shuffles the order of the elements in SliceUint32.
func (*SliceUint32) Sort ¶
func (s *SliceUint32) Sort() *SliceUint32
Sort sorts the elements of SliceUint32 in increasing order.
func (*SliceUint32) Swap ¶
func (s *SliceUint32) Swap(i, j int)
Swap swaps the elements in SliceUint32 specified by the indices i and j.
func (*SliceUint32) Transform ¶
func (s *SliceUint32) Transform(fn func(elem uint32) uint32) *SliceUint32
Transform modifies each element of SliceUint32 according to the specified function.
func (*SliceUint32) Unique ¶
func (s *SliceUint32) Unique() *SliceUint32
Unique modifies SliceUint32 to keep only the first occurrence of each element (removing any duplicates).
type SliceUint64 ¶
type SliceUint64 struct {
// contains filtered or unexported fields
}
SliceUint64 is a slice of type uint64.
func NewSliceUint64 ¶
func NewSliceUint64(elems ...uint64) *SliceUint64
NewSliceUint64 returns a pointer to a new SliceUint64 initialized with the specified elements.
func (*SliceUint64) Append ¶
func (s *SliceUint64) Append(elems ...uint64) *SliceUint64
Append adds the elements to the end of SliceUint64.
func (*SliceUint64) At ¶
func (s *SliceUint64) At(index int) uint64
At returns the element in SliceUint64 at the specified index.
func (*SliceUint64) Clone ¶
func (s *SliceUint64) Clone() *SliceUint64
Clone performs a deep copy of SliceUint64 and returns it
func (*SliceUint64) Count ¶
func (s *SliceUint64) Count() int
Count returns the number of elements in SliceUint64.
func (*SliceUint64) Data ¶
func (s *SliceUint64) Data() []uint64
Data returns the raw elements of SliceUint64.
func (*SliceUint64) Equal ¶
func (s *SliceUint64) Equal(s2 *SliceUint64) bool
Equal returns true if the SliceUint64 is logically equivalent to the specified SliceUint64.
func (*SliceUint64) Filter ¶
func (s *SliceUint64) Filter(fn func(elem uint64) bool) *SliceUint64
Filter removes elements from SliceUint64 that do not satisfy the filter function.
func (*SliceUint64) Insert ¶
func (s *SliceUint64) Insert(index int, elems ...uint64) *SliceUint64
Insert inserts the elements into SliceUint64 at the specified index.
func (*SliceUint64) Len ¶
func (s *SliceUint64) Len() int
Len returns the number of elements in SliceUint64 (alias for Count).
func (*SliceUint64) Less ¶
func (s *SliceUint64) Less(i, j int) bool
Less returns true if the SliceUint64 element at index i is less than the element at index j.
func (*SliceUint64) Max ¶
func (s *SliceUint64) Max() uint64
Max returns the largest (greatest ordered) element in SliceUint64.
func (*SliceUint64) Min ¶
func (s *SliceUint64) Min() uint64
Min returns the smallest (least ordered) element in SliceUint64.
func (*SliceUint64) Prepend ¶
func (s *SliceUint64) Prepend(elems ...uint64) *SliceUint64
Prepend adds the elements to the beginning of SliceUint64.
func (*SliceUint64) Remove ¶
func (s *SliceUint64) Remove(index int) *SliceUint64
Remove removes the element from SliceUint64 at the specified index.
func (*SliceUint64) Reverse ¶
func (s *SliceUint64) Reverse() *SliceUint64
Reverse reverses the order of the elements of SliceUint64.
func (*SliceUint64) Set ¶
func (s *SliceUint64) Set(index int, elem uint64) *SliceUint64
Set sets the element of SliceUint64 at the specified index.
func (*SliceUint64) Shuffle ¶
func (s *SliceUint64) Shuffle(seed int64) *SliceUint64
Shuffle randomly shuffles the order of the elements in SliceUint64.
func (*SliceUint64) Sort ¶
func (s *SliceUint64) Sort() *SliceUint64
Sort sorts the elements of SliceUint64 in increasing order.
func (*SliceUint64) Swap ¶
func (s *SliceUint64) Swap(i, j int)
Swap swaps the elements in SliceUint64 specified by the indices i and j.
func (*SliceUint64) Transform ¶
func (s *SliceUint64) Transform(fn func(elem uint64) uint64) *SliceUint64
Transform modifies each element of SliceUint64 according to the specified function.
func (*SliceUint64) Unique ¶
func (s *SliceUint64) Unique() *SliceUint64
Unique modifies SliceUint64 to keep only the first occurrence of each element (removing any duplicates).
type SliceUint8 ¶
type SliceUint8 struct {
// contains filtered or unexported fields
}
SliceUint8 is a slice of type uint8.
func NewSliceUint8 ¶
func NewSliceUint8(elems ...uint8) *SliceUint8
NewSliceUint8 returns a pointer to a new SliceUint8 initialized with the specified elements.
func (*SliceUint8) Append ¶
func (s *SliceUint8) Append(elems ...uint8) *SliceUint8
Append adds the elements to the end of SliceUint8.
func (*SliceUint8) At ¶
func (s *SliceUint8) At(index int) uint8
At returns the element in SliceUint8 at the specified index.
func (*SliceUint8) Clone ¶
func (s *SliceUint8) Clone() *SliceUint8
Clone performs a deep copy of SliceUint8 and returns it
func (*SliceUint8) Count ¶
func (s *SliceUint8) Count() int
Count returns the number of elements in SliceUint8.
func (*SliceUint8) Data ¶
func (s *SliceUint8) Data() []uint8
Data returns the raw elements of SliceUint8.
func (*SliceUint8) Equal ¶
func (s *SliceUint8) Equal(s2 *SliceUint8) bool
Equal returns true if the SliceUint8 is logically equivalent to the specified SliceUint8.
func (*SliceUint8) Filter ¶
func (s *SliceUint8) Filter(fn func(elem uint8) bool) *SliceUint8
Filter removes elements from SliceUint8 that do not satisfy the filter function.
func (*SliceUint8) Insert ¶
func (s *SliceUint8) Insert(index int, elems ...uint8) *SliceUint8
Insert inserts the elements into SliceUint8 at the specified index.
func (*SliceUint8) Len ¶
func (s *SliceUint8) Len() int
Len returns the number of elements in SliceUint8 (alias for Count).
func (*SliceUint8) Less ¶
func (s *SliceUint8) Less(i, j int) bool
Less returns true if the SliceUint8 element at index i is less than the element at index j.
func (*SliceUint8) Max ¶
func (s *SliceUint8) Max() uint8
Max returns the largest (greatest ordered) element in SliceUint8.
func (*SliceUint8) Min ¶
func (s *SliceUint8) Min() uint8
Min returns the smallest (least ordered) element in SliceUint8.
func (*SliceUint8) Prepend ¶
func (s *SliceUint8) Prepend(elems ...uint8) *SliceUint8
Prepend adds the elements to the beginning of SliceUint8.
func (*SliceUint8) Remove ¶
func (s *SliceUint8) Remove(index int) *SliceUint8
Remove removes the element from SliceUint8 at the specified index.
func (*SliceUint8) Reverse ¶
func (s *SliceUint8) Reverse() *SliceUint8
Reverse reverses the order of the elements of SliceUint8.
func (*SliceUint8) Set ¶
func (s *SliceUint8) Set(index int, elem uint8) *SliceUint8
Set sets the element of SliceUint8 at the specified index.
func (*SliceUint8) Shuffle ¶
func (s *SliceUint8) Shuffle(seed int64) *SliceUint8
Shuffle randomly shuffles the order of the elements in SliceUint8.
func (*SliceUint8) Sort ¶
func (s *SliceUint8) Sort() *SliceUint8
Sort sorts the elements of SliceUint8 in increasing order.
func (*SliceUint8) Swap ¶
func (s *SliceUint8) Swap(i, j int)
Swap swaps the elements in SliceUint8 specified by the indices i and j.
func (*SliceUint8) Transform ¶
func (s *SliceUint8) Transform(fn func(elem uint8) uint8) *SliceUint8
Transform modifies each element of SliceUint8 according to the specified function.
func (*SliceUint8) Unique ¶
func (s *SliceUint8) Unique() *SliceUint8
Unique modifies SliceUint8 to keep only the first occurrence of each element (removing any duplicates).
type SliceUintptr ¶
type SliceUintptr struct {
// contains filtered or unexported fields
}
SliceUintptr is a slice of type uintptr.
func NewSliceUintptr ¶
func NewSliceUintptr(elems ...uintptr) *SliceUintptr
NewSliceUintptr returns a pointer to a new SliceUintptr initialized with the specified elements.
func (*SliceUintptr) Append ¶
func (s *SliceUintptr) Append(elems ...uintptr) *SliceUintptr
Append adds the elements to the end of SliceUintptr.
func (*SliceUintptr) At ¶
func (s *SliceUintptr) At(index int) uintptr
At returns the element in SliceUintptr at the specified index.
func (*SliceUintptr) Clone ¶
func (s *SliceUintptr) Clone() *SliceUintptr
Clone performs a deep copy of SliceUintptr and returns it
func (*SliceUintptr) Count ¶
func (s *SliceUintptr) Count() int
Count returns the number of elements in SliceUintptr.
func (*SliceUintptr) Data ¶
func (s *SliceUintptr) Data() []uintptr
Data returns the raw elements of SliceUintptr.
func (*SliceUintptr) Equal ¶
func (s *SliceUintptr) Equal(s2 *SliceUintptr) bool
Equal returns true if the SliceUintptr is logically equivalent to the specified SliceUintptr.
func (*SliceUintptr) Filter ¶
func (s *SliceUintptr) Filter(fn func(elem uintptr) bool) *SliceUintptr
Filter removes elements from SliceUintptr that do not satisfy the filter function.
func (*SliceUintptr) Insert ¶
func (s *SliceUintptr) Insert(index int, elems ...uintptr) *SliceUintptr
Insert inserts the elements into SliceUintptr at the specified index.
func (*SliceUintptr) Len ¶
func (s *SliceUintptr) Len() int
Len returns the number of elements in SliceUintptr (alias for Count).
func (*SliceUintptr) Less ¶
func (s *SliceUintptr) Less(i, j int) bool
Less returns true if the SliceUintptr element at index i is less than the element at index j.
func (*SliceUintptr) Max ¶
func (s *SliceUintptr) Max() uintptr
Max returns the largest (greatest ordered) element in SliceUintptr.
func (*SliceUintptr) Min ¶
func (s *SliceUintptr) Min() uintptr
Min returns the smallest (least ordered) element in SliceUintptr.
func (*SliceUintptr) Prepend ¶
func (s *SliceUintptr) Prepend(elems ...uintptr) *SliceUintptr
Prepend adds the elements to the beginning of SliceUintptr.
func (*SliceUintptr) Remove ¶
func (s *SliceUintptr) Remove(index int) *SliceUintptr
Remove removes the element from SliceUintptr at the specified index.
func (*SliceUintptr) Reverse ¶
func (s *SliceUintptr) Reverse() *SliceUintptr
Reverse reverses the order of the elements of SliceUintptr.
func (*SliceUintptr) Set ¶
func (s *SliceUintptr) Set(index int, elem uintptr) *SliceUintptr
Set sets the element of SliceUintptr at the specified index.
func (*SliceUintptr) Shuffle ¶
func (s *SliceUintptr) Shuffle(seed int64) *SliceUintptr
Shuffle randomly shuffles the order of the elements in SliceUintptr.
func (*SliceUintptr) Sort ¶
func (s *SliceUintptr) Sort() *SliceUintptr
Sort sorts the elements of SliceUintptr in increasing order.
func (*SliceUintptr) Swap ¶
func (s *SliceUintptr) Swap(i, j int)
Swap swaps the elements in SliceUintptr specified by the indices i and j.
func (*SliceUintptr) Transform ¶
func (s *SliceUintptr) Transform(fn func(elem uintptr) uintptr) *SliceUintptr
Transform modifies each element of SliceUintptr according to the specified function.
func (*SliceUintptr) Unique ¶
func (s *SliceUintptr) Unique() *SliceUintptr
Unique modifies SliceUintptr to keep only the first occurrence of each element (removing any duplicates).
Source Files ¶
- doc.go
- generate.go
- slice_bool.go
- slice_byte.go
- slice_complex128.go
- slice_complex64.go
- slice_error.go
- slice_float32.go
- slice_float64.go
- slice_int.go
- slice_int16.go
- slice_int32.go
- slice_int64.go
- slice_int8.go
- slice_rune.go
- slice_string.go
- slice_uint.go
- slice_uint16.go
- slice_uint32.go
- slice_uint64.go
- slice_uint8.go
- slice_uintptr.go
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
golist
Golist is a tool that generates 'Slice*' type wrappers for a given slice type T. Typically this process would be run using go generate, like this: //go:generate golist -type=Foo running this command golist -type=Foo in the same directory will create the file slice_foo.go containing a definition of type SliceFoo struct { data []Foo } The default type is SliceT or sliceT (depending on if the type is exported) and output file is slice_t.go.
|
Golist is a tool that generates 'Slice*' type wrappers for a given slice type T. Typically this process would be run using go generate, like this: //go:generate golist -type=Foo running this command golist -type=Foo in the same directory will create the file slice_foo.go containing a definition of type SliceFoo struct { data []Foo } The default type is SliceT or sliceT (depending on if the type is exported) and output file is slice_t.go. |