All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning: TBD, use modules or another vendor system.
- Update package name
di.Decorate
function that applies function after type resolve.
- @chirino: Prefer using "di:" field tags to control injection options to avoid conflicting with tags used by other libraries (#38).
- @chirino: Container nesting. See
AddParent()
function (#35). - An experimental feature: Instance decoration with
di.Decorate()
.
container.ProvideValue()
function.
container.Apply()
function.
- Style and coverage fixes.
- Added embed fields support.
di.Inject
now works with structs and pointers correctly.
- Fix
optional
fields resolving.
- Fix
di.As()
with several interfaces.
- Removed debug print.
- Documentation fixes.
- Changed logging interface. See
di.SetTracer()
.
- Some documentation and test updates.
- Add error to
Has()
.
Has()
returns false if container could not build instance.
- The supported version of go >1.13.
- Fix field injection into interface implementations.
Iterate
method for lazy loaded iteration by all instances.
- Bug: Resolve type as interface causes type reinitialization.
- Provide duplications allowed.
- Removed tag
di
. Now all public fields in injectable type will be injected. - Resolving node without tags, now returns all nodes of this type.
- Now,
di:"type_name"
is aname:"type_name"
. - Removed
di.Prototype()
: bad practice.
- Tagging that allows specifying key value identity for types.
skip:"true"
field tag option, that skips field providing.
- A bit of bad code
- Any type can be automatically resolved as a group.
- The container exposes itself by default.
- The only named type in the group will be resolved without a name.
- Dependency graph can be edited in the runtime (but you need to be careful with this).
- Changed
di.Parameter
todi.Inject
. - Remove
optional
support fromdi
tag. - Add
optional
tag. See this.
- Support injection into constructor result struct via
di.Inject
.
- Location of
di.Provide()
,di.Invoke()
,di.Resolve()
in error.
- Fix:
di.As()
with nil causes panic.
container.Provide
could not be called after container compilation now.- Improve error messages.
Initial release.