must

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 0 Imported by: 1

Documentation

Overview

Package must provides a way to panic if the result of a multi-value function call returns an error, or return just the values if there is no error.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get[T any](value T, err error) T

Get panics if err is not nil, otherwise it returns value.

func Get2

func Get2[T, U any](left T, right U, err error) (T, U)

Get2 panics if err is not nil, otherwise it returns left and right.

Types

This section is empty.

Jump to

Keyboard shortcuts

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