sliceutils

package
v0.0.0-...-98ed532 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains[T comparable](data []T, v T) bool

func ElementsMatch

func ElementsMatch(listA, listB interface{}) (ok bool, err error)

func ElementsMatchImplicit

func ElementsMatchImplicit(listA, listB interface{}) bool

func GetInt

func GetInt(slice []int, index int) (int, bool)

func GetString

func GetString(slice []string, index int) (string, bool)

func InsertStringAt

func InsertStringAt(data []string, i int, v string) []string

InsertAt inserts v into data at position i

func IntRangeUncapped

func IntRangeUncapped(in []int, start, end int) []int

func ObjectsAreEqual

func ObjectsAreEqual(expected, actual interface{}) bool

ObjectsAreEqual determines if two objects are considered equal.

This function does no assertion of any kind.

func Pop

func Pop[T any](data []T) (T, []T, error)

func RemoveFromStrings

func RemoveFromStrings(slice []string, indexes ...int) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

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