runtime

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Must

func Must(err error)

Must panics if err is not nil. It is useful for handling errors in initialization code where recovery is not possible.

func Must1

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

Must1 is like Must but returns the value if err is nil. It is useful for handling errors in initialization code where recovery is not possible and a value needs to be returned.

func Must2

func Must2[T1 any, T2 any](v1 T1, v2 T2, err error) (T1, T2)

Must2 is like Must but returns two values if err is nil. It is useful for handling errors in initialization code where recovery is not possible and two values need to be returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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