util

package
v2.1.4 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IfEmpty

func IfEmpty(value, fallback string) string

func Must

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

Must is a helper that wraps a call to a function returning (T, error) and panics if the error is non-nil.

Types

type Pair

type Pair[T, U any] struct {
	First  T
	Second U
}

func Zip

func Zip[T, U any](ts []T, us []U) ([]Pair[T, U], error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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