This repository has been archived by the owner on Aug 14, 2024. It is now read-only.
Releases: berkaroad/ioc
Releases · berkaroad/ioc
v1.2.0
-
- It will use zero value instead of panic if depended service not registerd, when inject to function
-
- The initialize method that invoked automatically when inject to singleton instance, can specific another one by the returns of method
InitializeMethodName() string
- The initialize method that invoked automatically when inject to singleton instance, can specific another one by the returns of method
-
- optimize performance of inject to *struct
-
- optimize performance of get transient instance
-
- refactor interface
Container
- refactor interface
v1.1.1
v1.1.0
-
- add function
New() Container
- add function
-
Inject()
andInjectFromC()
can acceptreflect.Value
-
Resolve()
will auto inject to singleton instance and it's methodInitialize(XXX)
-
ioc.SetParent()
will append parent to exists parent
can replace exists service, by register to parent's container and register to current's to override parent's.
-
- add convenient functions for interface
Container
new functions
AddSingletonToC(XXX)
,AddTransientToC(XXX)
,GetServiceFromC(XXX)
,InjectFromC(XXX)
.both last parent and new parent can also resolve services.
- add convenient functions for interface
-
- move
SetParent(parent Resolver)
from interfaceContainer
toResolver
- move
-
- split method
Register(XXX)
toRegisterSingleton(XXX)
andRegisterTransient(XXX)
- split method
-
- 39% faster than v0.1.1
v1.0.0
refactor ioc: for simple and performance.
-
- add convenient functions
-
- support inject to function and *struct
Should add struct tag 'ioc-inject:"true"' to field if want to be injected, but field type
ioc.Resolver
is not necessary. -
- 50% faster than last version, when injecting to function
Compare with
Container.Invoke()
in last version. -
- remove interface
Initializer
Because it is not necessary.
- remove interface
-
- rename interface
ReadonlyContainer
toResolver
Just for
SetParent()
to resolve by parent. - rename interface
-
- simplify interface
Container
Can customize implementation just for compatibility with others
- simplify interface
-
- remove log