guard

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: MIT Imports: 2 Imported by: 0

README

go-common > guard

This package contains utilities for guarding against invalid values.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

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

func Error added in v1.11.0

func Error(err error, msg string)

func Exclusive added in v1.9.0

func Exclusive(a, b bool, msg string)

func False

func False(value bool, msg string)

func GreaterThan added in v1.9.0

func GreaterThan[T constraints.Ordered](a, b T, msg string)

func GreaterThanEq added in v1.9.0

func GreaterThanEq[T constraints.Ordered](a, b T, msg string)

func GreaterThanEqFunc added in v1.9.0

func GreaterThanEqFunc[T any](a, b T, fn func(a, b T) int, msg string)

func GreaterThanFunc added in v1.9.0

func GreaterThanFunc[T any](a, b T, fn func(a, b T) int, msg string)

func LessThan added in v1.9.0

func LessThan[T constraints.Ordered](a, b T, msg string)

func LessThanEq added in v1.9.0

func LessThanEq[T constraints.Ordered](a, b T, msg string)

func LessThanEqFunc added in v1.9.0

func LessThanEqFunc[T any](a, b T, fn func(a, b T) int, msg string)

func LessThanFunc added in v1.9.0

func LessThanFunc[T any](a, b T, fn func(a, b T) int, msg string)

func Nil added in v1.9.0

func Nil(value any, msg string)

func NoError added in v1.11.0

func NoError(err error, msg string)

func NotEqual added in v1.9.0

func NotEqual[T comparable](a, b T, msg string)

func NotNil

func NotNil(value any, msg string)

func NotZero

func NotZero[T comparable](value T, msg string)

func True

func True(value bool, msg string)

func Zero added in v1.9.0

func Zero[T comparable](value T, msg string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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