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
funcProvideAny[Tany](i do.Injector, funany) {
fn:=reflect.ValueOf(fun)
// check that fn is func(...) T or func(...) (T, error)do.Provide[T](i, func(i do.Injector) (resT, errerror) {
inputTypes:= []reflect.Value{}
// inputTypes - invoked input by type nameout:=fn.Call(inputTypes)
// res = out[0]// err = out[1]return
})
}
Also the function can have variadic names ... string
With a match for each function parameter, to use it instead of the type name.
Analog do:"name" in struct
If interested I can send pull request.
We can discuss the interface.
Where
Also the function can have variadic
names ... string
With a match for each function parameter, to use it instead of the type name.
Analog
do:"name"
in structIf interested I can send pull request.
We can discuss the interface.
Now it just
The text was updated successfully, but these errors were encountered: