assert

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// EnvPanicOnError is the env name to determine panic on assertion failed or not
	EnvPanicOnError = "PANIC_ON_ERROR"
)

Variables

This section is empty.

Functions

func Assert

func Assert(condition bool, message string)

Assert check condition, if condition is false, print message by log or panic

func Assertf

func Assertf(condition bool, format string, args ...interface{})

Assertf check condition, if condition is false, print message using Assert

Types

This section is empty.

Jump to

Keyboard shortcuts

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