dependency

package
v0.0.0-...-0a82276 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDependencyByName

func GetDependencyByName[A, B any](getter dependency.Getter, name string, fn func(A) B) (B, error)

GetDependencyByName is a helper function that gets a dependency by name and calls a function with the dependency as an argument. The functor (A -> B) is applied to the dependency to either get a sub dependency or to return the dependency itself.

func Identity

func Identity[A, B any](a A) B

Identity is a helper function that returns the argument as the same type. This will panic if A and B aren't compatible types.

Types

This section is empty.

Jump to

Keyboard shortcuts

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