internal

package
v0.0.0-...-83152a7 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Must

func Must[T any](a T, err error) T

Must panics if the error is non-nil. It is intended for use in variable initializations such as f := internal.MustNoErr(os.OpenFile("notes.txt", os.O_RDONLY, 0600))

func MustNoErr

func MustNoErr(err error)

MustNoErr logs the error message and exits, if the error is non-nil. It is intended for use in statements that could return an error and continued execution is not meaningful.

func MustOkMsgf

func MustOkMsgf[T any](a T, ok bool, msg string, args ...any) T

MustOkMsgf logs the error message and exits, if the condition is false. It is intended for use in statements that could return a flag and continued execution is not meaningful.

Types

This section is empty.

Jump to

Keyboard shortcuts

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