lang

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package lang container general purpose programming helpers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bind added in v0.2.0

func Bind[T any, E any](f func(t T) E, t T) func() E

Bind converts a single-parameter function to a no-parameter one by binding the given value to the parameter. Useful together with fi.NoErrorF or defer.

func IfEmpty

func IfEmpty[T comparable](value, alt T) T

IfEmpty returns alt if value is empty (zero-value), and value itself, if not empty

Types

This section is empty.

Jump to

Keyboard shortcuts

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