must

package
v1.9.1-teampagebase.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package much provides generic helpers to ensure values are returned

Used as wrappers around functions that return (value, error) to always return a value

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllOrDefault added in v1.1.0

func AllOrDefault[T any](v []T, defaultValue T) (t []T)

func First

func First[T any](v []T) T

func FirstOrDefault

func FirstOrDefault[T any](v []T, defaultValue T) (t T)

func Must

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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