assert

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package assert provides some basic assertion helpers for Go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert(predicate bool, msg any)

Assert panics if the predicate is false with the provided argument.

func Assertf

func Assertf(predicate bool, fmtMsg string, args ...any)

Assertf panics if the predicate is false and formats the message using the same formatting as fmt.Printf.

func NoError

func NoError(err error)

NoError panics if the error is non-nil and the message is the error itself. This is just shorthand for "Assert(err == nil, err)".

Types

This section is empty.

Jump to

Keyboard shortcuts

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