di

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: MIT Imports: 2 Imported by: 0

README

di

This project contains generic helper functions to make dependency injection a bit simpler.

This package is opinionated and depends on the dig dependency container.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Inject

func Inject[T any](container *dig.Container) (T, error)

func MustInject

func MustInject[T any](container *dig.Container) T

func MustProvide

func MustProvide(container *dig.Container, fn any)

func MustProvideVal

func MustProvideVal[Val any](container *dig.Container, val Val)

func NewContainer

func NewContainer() *dig.Container

Types

This section is empty.

Jump to

Keyboard shortcuts

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