I've never been convinced by DI frameworks. I've always enjoyed the fact that the Go ecosystem leans away from them and I would hope things stay that way. In my experience they just obfuscate what should be a straightforward, explicit process of setting up your app in main. The less magic happening there the better.

Not just that, but I don't understand why users would be so eager to kill type safety in their applications. If i'm understanding, these injection methods are totally type-unsafe and construction errors are deferred until runtime?

https://pkg.go.dev/go.uber.org/fx#Provide

I've used this framework. The exceptions being deferred until runtime were really frustrating.

If you really want to use DI in golang, for some reason, wire[1] at least still gives you type safety and compile-time failures.

1. https://github.com/google/wire