zint64s

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInterfaceNotInt64 = errors.New("encountered non-int64 interface")
)

Functions

func As

func As(slice []interface{}) (res []int64, err error)

Convert a []interface{} slice into []int64 slice if possible

func Contains

func Contains(haystack []int64, needle int64) bool

Check if a slice ([]int64) contains a matching member

func ContainsAll

func ContainsAll(haystack []int64, needles ...int64) bool

Check if a []int64 slice contains ALL of the provided members

func ContainsAny

func ContainsAny(haystack []int64, needles ...int64) bool

Check if a []int64 slice contains ANY of the provided members

func Cut

func Cut(slice []int64, separator int64) (left, right []int64, found bool)

Cut the slice into two slices separated by the separator

func CutAny

func CutAny(val []int64, seperators ...int64) (left, right []int64, found bool)

Cut the slice into two slices separated by the first separator

func Equal

func Equal(a []int64, b []int64) bool

func Index

func Index(haystack []int64, needle int64) int

Find the index where the needle appears. Returns -1 if the needle doesn't appear in the slice.

func Interface

func Interface(slice []int64) (res []interface{}, err error)

Convert a []int64 slice into a slice of interfaces ([]interface{})

func Split

func Split(slice []int64, separator int64) (parts [][]int64)

Split the slice into one or more slices separated by the separator

Types

This section is empty.

Jump to

Keyboard shortcuts

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