utils

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Err

func Err[T any](_ T, err error) error

(AI GENERATED DESCRIPTION): Asserts that the supplied error is non‑nil (for testing) and then returns that error.

func ErrB

func ErrB[T any](_ T, err error) error

(AI GENERATED DESCRIPTION): Panics if the supplied error is nil; otherwise returns the error unchanged (the first, generic argument is ignored).

func NoErr

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

(AI GENERATED DESCRIPTION): Asserts that the supplied error is nil (via the test framework) and returns the value `v`.

func NoErrB

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

(AI GENERATED DESCRIPTION): Panics if `err` is non‑nil; otherwise returns the provided value `v`.

func SetT

func SetT(t *testing.T)

(AI GENERATED DESCRIPTION): Assigns the supplied *testing.T to the package‑level test variable for use by the test suite.

Types

This section is empty.

Jump to

Keyboard shortcuts

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