must

package
v1.66.4 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: BSD-3-Clause Imports: 0 Imported by: 18

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