assert

package
v1.28.3 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OnAssertionViolation func(name, msg string)

Functions

func Assert

func Assert(name string, cond bool, format string, args ...any)

Assert panics with an "Assertion violated:" prefix when cond is false. name identifies this assertion; set KANIKO_IGNORE_ASSERTIONS=name to skip it. Use it to document and enforce invariants that must always hold.

func Unreachable

func Unreachable(format string, args ...any)

Unreachable panics with an "Unreachable Code:" prefix. Use it to mark code paths that must never execute.

Types

This section is empty.

Jump to

Keyboard shortcuts

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