assert

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 3 Imported by: 20

Documentation

Overview

Package assert provides assertions that panic on failure, including checks for errors, values, and view identities. Optional func() arguments run before the panic to release resources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal(expected, actual any, msgAndArgs ...any)

Equal checks that actual is as expected, it panics otherwise

func Error

func Error(err error, msgAndArgs ...any)

Error checks that the passed error is not nil, it panics otherwise

func Fail

func Fail(failureMessage string, msgAndArgs ...any)

func False

func False(value bool, msgAndArgs ...any)

func NoError

func NoError(err error, msgAndArgs ...any)

NoError checks that the passed error is nil, it panics otherwise

func NotEmpty

func NotEmpty(o any, msgAndArgs ...any)

func NotEqual

func NotEqual(expected, actual any, msgAndArgs ...any)

func NotNil

func NotNil(object any, msgAndArgs ...any)

func True

func True(value bool, msgAndArgs ...any)

func ValidIdentity

func ValidIdentity(id view.Identity, err error, msgAndArgs ...any) view.Identity

ValidIdentity checks that the passed error is nil and id is not empty

Types

This section is empty.

Jump to

Keyboard shortcuts

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