must

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package must provides Do helper function.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NoError added in v0.1.1

func NoError(err error)

NoError panics if the error is not nil.

Use that function only for static initialization, test code, or code that "can't" fail. When in doubt, don't.

func NotFail

func NotFail[T any](res T, err error) T

NotFail panics if the error is not nil, returns res otherwise.

Use that function only for static initialization, test code, or code that "can't" fail. When in doubt, don't.

Types

This section is empty.

Jump to

Keyboard shortcuts

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