assert

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool2Integer

func Bool2Integer[T Integer](b bool) T

func Contains

func Contains[S ~[]E, E comparable](t common.T, s S, v E)

func ContainsString

func ContainsString(t common.T, s, v string)

func DumpHex

func DumpHex[T []byte | *bytes.Buffer](buf T) (dump string)

func Empty

func Empty(t common.T, object any)

func Equal

func Equal[T any](t common.T, want, got T, opts ...cmp.Option)

func Equalf

func Equalf(t common.T, expected any, actual any, msg string, args ...any)

func Error

func Error(t common.T, e error)

func False

func False(t common.T, x bool)

func FormatInteger

func FormatInteger[T Integer](data T) string

func FormatIntegerHex

func FormatIntegerHex[T Integer](data T) string

func FormatIntegerHex0x

func FormatIntegerHex0x[T Integer](data T) string

func GreaterThan

func GreaterThan[T Ordered](t common.T, big, small T)

func GreaterThanOrEqual

func GreaterThanOrEqual[T Ordered](t common.T, big, small T)

func In

func In[T any](t common.T, element T, slice []T, opts ...cmp.Option)

func Integer2Bool

func Integer2Bool[T Integer](value T) bool

func IsASCIIDigit

func IsASCIIDigit(s string) bool

func IsIncludeLine

func IsIncludeLine(s string) bool

func Len

func Len(t common.T, object any, length int)

func LessThan

func LessThan[T Ordered](t common.T, small, big T)

func LessThanOrEqual

func LessThanOrEqual[T Ordered](t common.T, small, big T)

func Nil

func Nil(t common.T, v any)

func NoError

func NoError(t common.T, e error)

func NotContains

func NotContains[S ~[]E, E comparable](t common.T, s S, v E)

func NotContainsString

func NotContainsString(t common.T, s, v string)

func NotEmpty

func NotEmpty(t common.T, object any)

func NotEqual

func NotEqual[T any](t common.T, want, got T, opts ...cmp.Option)

func NotIn

func NotIn[T any](t common.T, element T, slice []T, opts ...cmp.Option)

func NotNil

func NotNil(t common.T, v any)

func NotPanics

func NotPanics(t common.T, expected any)

func NotZero

func NotZero(t common.T, v any)

func Panics

func Panics(t common.T, f func())

func True

func True(t common.T, x bool)

func UnsignedInteger

func UnsignedInteger[T Unsigned](t common.T, want, got T, opts ...cmp.Option)

func ValueIsBytesType

func ValueIsBytesType(v reflect.Value) bool

func Zero

func Zero(t common.T, v any)

Types

type Complex

type Complex interface {
	~complex64 | ~complex128
}

type Float

type Float interface {
	~float32 | ~float64
}

type Integer

type Integer interface {
	Signed | Unsigned
}

type Ordered

type Ordered interface {
	Integer | Float | ~string
}

type Signed

type Signed interface {
	~int | ~int8 | ~int16 | ~int32 | ~int64
}

type Unsigned

type Unsigned interface {
	~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳