util

package
v0.0.0-...-bc49051 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Must

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

Must is a generic "must" handler that accepts a value and an error, and panics if the error is set, otherwise returning the value.

func Ref

func Ref[T any](v T) *T

Ref returns a pointer to a given value of a type.

It exists because we can't do `&true` to assign a pointer to a bool.

Types

This section is empty.

Jump to

Keyboard shortcuts

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