di

package
v0.0.0-...-1f910d1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

wrapper for dependency injection using dig

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Invoke

func Invoke(fn interface{}, opts ...dig.InvokeOption) error

Invoke function using DI Container

func Provide

func Provide(constructor interface{}, opts ...dig.ProvideOption) interface{}

Provide constructor function to DI Container The recommendation is to provide constructor in the same file with the definition. Here is a example:

var _ = di.Provide(YourContructor)
func YourContructor() {
	// ...
}

Types

This section is empty.

Jump to

Keyboard shortcuts

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