Open New2Niu opened 2 years ago
Hello! We currently do not support this feature, but I think we might want to. This ties into two issue that have been discussed on the uber-go/fx project more: https://github.com/uber-go/fx/issues/725 and https://github.com/uber-go/fx/issues/726.
Dig currently prevents structs tagged with dig.In
from being returned from a constructor.
There could be two ways for us to solve this:
dig.In
temporarily and then letting the constructor return it (this will need https://github.com/uber-go/fx/issues/726).We'll discuss this internally and try to find a long-term solution here.
Internal issue ref: GO-1394
As above, I must create injector struct as param to NewZoo. How can I simplify it.Like this