must

package
v1.38.4 Latest Latest
Warning

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

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

Documentation

Overview

Package must assists in calling functions that must succeed.

Example usage:

var target = must.Get(url.Parse(...))
must.Do(close())

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(err error)

Do panics if err is non-nil.

func Get

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

Get returns v as is. It panics if err is non-nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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