ensure

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MPL-2.0 Imports: 0 Imported by: 10

Documentation

Overview

Package ensure provides a set of functions that panic if the error is not nil.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NoError

func NoError(err error)

NoError panics if the error is not nil.

func Value

func Value[V any](v V, err error) V

Value return value or panics if the error is not nil.

func Values

func Values[V, V2 any](v V, v2 V2, err error) (V, V2)

Values returns values or panics if the error is not nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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