util

package
v0.0.0-...-9aa6f55 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertEqual

func AssertEqual[T comparable](value, expected T, t *testing.T)

func AssertEqualSlice

func AssertEqualSlice[T comparable](value, expected []T, t *testing.T)

func AssertFalse

func AssertFalse(value bool, t *testing.T)

func AssertNil

func AssertNil[T comparable](value *T, t *testing.T)

func AssertNotEqual

func AssertNotEqual[T comparable](value, expected T, t *testing.T)

func AssertNotEqualSlice

func AssertNotEqualSlice[T comparable](value, expected []T, t *testing.T)

func AssertNotNil

func AssertNotNil[T comparable](value *T, t *testing.T)

func AssertTrue

func AssertTrue(value bool, t *testing.T)

func Equal

func Equal[T constraints.Ordered](a, b []T) bool

func Filler

func Filler[T any](f T) T

func Hash

func Hash[A comparable](a A) uintptr

func Max

func Max[T constraints.Ordered](elements ...T) (minima T)

func Min

func Min[T constraints.Ordered](elements ...T) (minima T)

func MinMax

func MinMax[T constraints.Ordered](elements ...T) (minima, maxima T)

func SortNumerics

func SortNumerics[N Numeric](numbers []N)

func Swap

func Swap[T any](x, y *T)

Types

type Numeric

type Numeric interface {
	constraints.Float | constraints.Integer
}

type Predicate

type Predicate[T any] func(T) bool

type Transform

type Transform[T, U any] func(T) U

type TreeNode

type TreeNode[T constraints.Ordered] interface {
	// contains filtered or unexported methods
}

Tree Node Interface

Jump to

Keyboard shortcuts

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