dig is a compile‑time code generation based DI tool for Go. It provides a more intuitive API than Wire , with native generics support , built‑in closure capture safety that Wire lacks, and is faster than Fx by eliminating runtime reflection — all with zero runtime dependencies

code-generation dependency-injection di dig framework fx go golang microservices modular wire wire-alternative
1 Open Issue Need Help Last updated: Jul 14, 2026

Open Issues Need Help

View All on GitHub

dig is a compile‑time code generation based DI tool for Go. It provides a more intuitive API than Wire , with native generics support , built‑in closure capture safety that Wire lacks, and is faster than Fx by eliminating runtime reflection — all with zero runtime dependencies

Go
#code-generation#dependency-injection#di#dig#framework#fx#go#golang#microservices#modular#wire#wire-alternative