assert

package
v0.0.0-...-3c1fd5d Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 2 Imported by: 10

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)

Bigger invariant will panic if a is lesser than b.

func Equal

func Equal[T comparable](a, b T)

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

func EqualBytes

func EqualBytes(a, b []byte)

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

func EqualDeep

func EqualDeep(a, b interface{})

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

func EqualError

func EqualError(a, b error)

EqualError invariant will panic if two errors are not equal.

func Lesser

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

Lesser invariant will panic if a is bigger than b.

Types

This section is empty.

Jump to

Keyboard shortcuts

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