assert

package
v0.0.0-...-155bc9a Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2026 License: MIT Imports: 3 Imported by: 25

Documentation

Index

Constants

This section is empty.

Variables

View Source
var On bool

Turns on assertions.

Functions

func Bigger

func Bigger[T constraints.Ordered](a, b T, msgAndArgs ...any)

Bigger invariant will panic if a is lesser than b.

func Equal

func Equal[T comparable](a, b T, msgAndArgs ...any)

Equal invariant will panic if two compared variables are not equal.

func EqualBytes

func EqualBytes(a, b []byte, msgAndArgs ...any)

EqualBytes invariant will panic if two byte slices are not equal.

func EqualDeep

func EqualDeep(a, b any, msgAndArgs ...any)

EqualDeep invariant will panic if two variables are not deep equal.

func EqualError

func EqualError(a, b error, msgAndArgs ...any)

EqualError invariant will panic if two errors are not equal.

func Lesser

func Lesser[T constraints.Ordered](a, b T, msgAndArgs ...any)

Lesser invariant will panic if a is bigger than b.

func SameTime

func SameTime(a, b time.Time, delta time.Duration, msgAndArgs ...any)

SameTime invariant will panic if two times are not equal.

Types

This section is empty.

Jump to

Keyboard shortcuts

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