You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2: Support service lookup:
There is scenario that we just want to get a service when in a function call but I dont want to new a new instance of the target service.
in java ecosystem the famous springboot support above features.
I am choosing a DI framework for my project and find I need above two features. the case is
** source code**
interface A {
M1()
M2()
}
var _ A = (*ImplA)(nil)
struct ImplA {
}
func NewImplaA() {
}
....
but right now I want to test another function which depends on the interface(ImplA) with Mock. if this framework can supply above features than I can inject a mocked implementation and then the tested method can looup the mock object.
The text was updated successfully, but these errors were encountered:
kcmvp
changed the title
Feature request: service lookup
Feature request: service lookup & SingleTon
Sep 8, 2022
kcmvp
changed the title
Feature request: service lookup & SingleTon
Feature request: service lookup & Singleton
Sep 8, 2022
1: Does this framework ensure singleton instance?
2: Support service lookup:
There is scenario that we just want to get a service when in a function call but I dont want to new a new instance of the target service.
in java ecosystem the famous springboot support above features.
I am choosing a DI framework for my project and find I need above two features. the case is
** source code**
but right now I want to test another function which depends on the interface(ImplA) with Mock. if this framework can supply above features than I can inject a mocked implementation and then the tested method can looup the mock object.
The text was updated successfully, but these errors were encountered: