must

package
v0.1.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fn

func Fn[T any](v T, err error) T

Fn panics if err is not nil, otherwise returns v. Use for functions returning (T, error).

Example:

slug := must.Fn(slug.New("my-slug"))

func FnErr

func FnErr(err error)

FnErr panics if err is not nil. Use for functions returning only error.

Example:

must.FnErr(req.Config.FromPostgresConfig(...))

func Slug

func Slug(value string) slug.Slug

Slug panics if slug.New returns an error, otherwise returns the parsed slug.

Types

This section is empty.

Jump to

Keyboard shortcuts

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