runtimex

package
v0.0.0-...-73c1263 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package runtimex contains runtime extensions. This package is inspired to https://pkg.go.dev/github.com/m-lab/go/rtx, except that it's simpler.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert(assertion bool, message string)

Assert calls panic if assertion is false. The type passed to panic is an error constructed using errors.New(message).

func PanicIfNil

func PanicIfNil(v any, message string)

PanicIfNil calls panic if the given interface is nil. The type passed to panic is an error constructed using errors.New(message).

func PanicIfTrue

func PanicIfTrue(assertion bool, message string)

PanicIfTrue calls panic if assertion is true. The type passed to panic is an error constructed using errors.New(message).

func PanicOnError

func PanicOnError(err error, message string)

PanicOnError calls panic() if err is not nil. The type passed to panic is an error type wrapping the original error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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