google/wire ? reverse-engineered prompt
Reverse engineered prompt
Build me a Go tool that helps with dependency injection at compile time, kind of like Wire.
I want to be able to define normal provider functions that return app dependencies, then have the tool generate the initialization code that connects everything together without using reflection or global variables. It should feel simple and explicit, so the generated code is still useful even if someone writes the setup by hand later.
Please include a small command line tool, the core library for describing providers and injector functions, and enough docs or examples to show how to use it in a real Go project. Make sure it works cleanly with standard Go modules, and keep the design focused on code generation rather than runtime magic.
If anything is unclear from the current docs, please look up the current Wire docs online and match the intended behavior as closely as possible.
Are you gonna build this?
make sure you review the code using coderabbit