# README
GoZix DI
Dependency injection for Go programming language.
Features
- Auto wiring
- Constructor injection
- Instance injection
- Interfaces support
- Optional injection
- Field injection
- Lazy loading
- Tagging
- Cleaning
Installation
go get github.com/gozix/di
Documentation
You can find documentation on pkg.go.dev and read source code if needed.
Questions
If you have any questions, feel free to create an issue.
# Functions
Add is builder constructor option.
AddOptions allow to organize logical groups of add options.
As sets type alias.
Autowire is builder constructor option.
BuilderOptions allow to organize logical groups of builder options.
Constraint restricts the dependency resolving.
Filter filters the definitions the provided match function.
NewBuilder is builder constructor.
NewTypeError is error constructor.
Optional set dependency optional or not, by default all dependencies are required.
Provide is builder constructor option.
ProvideOptions allow to organize logical groups of provide options.
Sort sorts the definitions the provided less function.
Unshared mark definition as Unshared.
WithoutTags filters out definitions with needed tags.
WithTags filters out definitions without needed tags.
# Variables
ErrDoesNotExist triggered when type not present in container.
ErrInvalidConstructor is error triggered when constructor have invalid signature.
ErrInvalidType is error triggered when provided invalid type.
ErrInvalidValue is error triggered when provided invalid value.
ErrIsNil is error triggered when provided nil alias.
ErrMultipleDefinitions triggered when type resolved in single instance, but container contain multiple types.
ErrMustBeSliceOrPointer triggered when resolved in invalid target.
ErrNotImplementInterface is error triggered when provided type not implement alias interface.
ErrNotPointerToInterface is error triggered when provided alias not pointer to interface.
ErrorMustBeFunction triggered when value not a function.
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
TypeError records an error and type that caused it.
# Interfaces
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author