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
I hope to support tag auto inject E.g: di.Parameter
typeControllerstruct {
User types.UserService`di:""`// has `di` tag auto inject, di tag with nameCfg*config.Config`di:""`Friend types.FriendService`di:""`
}
funcNewController() *Controller {
return&Controller{}
}
I understand your problem. But I wouldn't want the code to be unable to be used without a container. This approach creates a direct connection between the container and the package that contains such a constructor. And if you use the constructor without a container, you will get a non-working code. I would like to avoid this.
On the other hand, this is an optional feature. This does not change the normal workflow. In general, it can be merged.
As an alternative, how do you look to introduce the di.ProvideValue() with di.ResolvePublicFields() provide option (need to think about naming):
my project full of injection functions like this
I hope to support
tag
auto inject E.g:di.Parameter
Here is my simple implementation
ValuePatch
is private field set patch func, not necessaryThe text was updated successfully, but these errors were encountered: