dependencies

package
v0.0.0-...-ecfa503 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get[T any](dm *DependencyManager) (T, error)

Get retrieves the already-initialized dependency for the specified type.

func Register

func Register[T any](dm *DependencyManager, initializer func(*DependencyManager) (T, error))

Register initializes and registers a dependency for the specified type.

Types

type DependencyManager

type DependencyManager struct {
	// contains filtered or unexported fields
}

DependencyManager manages dependencies by initializing them at registration.

func NewDependencyManager

func NewDependencyManager() *DependencyManager

NewDependencyManager creates a new instance of DependencyManager.

Jump to

Keyboard shortcuts

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