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 golang modular microservices framework dependency-injection code-generation wire di fx dig wire-alternative
-
Updated
Sep 4, 2026 - Go