assert

package
v1.5.1-beta.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2022 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