util

package module
v0.0.0-...-8b02fee Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: Apache-2.0 Imports: 0 Imported by: 7

README

This repository contains misc. Go utility packages that I write as I need them for other projects.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chkfatal

func Chkfatal(err error)

Chkfatal panics if err is not nil

func Idempotent

func Idempotent(f func()) func()

Idempotent returns a function which calls f() the first time it is called, and then no-ops thereafter.

func Must

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

Must panics if err != nil, otherwise returns value.

Types

This section is empty.

Directories

Path Synopsis
Package debugging exports various helpers useful when debugging.
Package debugging exports various helpers useful when debugging.
Package deferred provides tools for deferring actions to be run at a later time.
Package deferred provides tools for deferring actions to be run at a later time.
Package exn provides an exception-like mechanism.
Package exn provides an exception-like mechanism.
Package maybe provides support for working with optional values.
Package maybe provides support for working with optional values.
Package orerr provides a type OrErr for working with (value, error) pairs.
Package orerr provides a type OrErr for working with (value, error) pairs.
Package rc provides reference-counted cells.
Package rc provides reference-counted cells.
poolslice
Package poolslice supports allocating slots out of a slice.
Package poolslice supports allocating slots out of a slice.
sync
mutex
Package mutex provides mutexes that wrap the thing they protect.
Package mutex provides mutexes that wrap the thing they protect.
Package thunk provides "thunks" (type T), which are wrappers around lazy or concurrent computations.
Package thunk provides "thunks" (type T), which are wrappers around lazy or concurrent computations.

Jump to

Keyboard shortcuts

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