May 2020

The Golang community has had its fair share of dependency injection skeptics, partly because they confused the pattern with specific frameworks, and developers with a system-programming background naturally dislike runtime overhead caused by reflection. Then along came Wire, a compile-time dependency injection tool that can generate code and wire components together. Wire has no additional runtime overhead, and the static dependency graph is easier to reason about. Whether you handwrite your code or use frameworks, we recommend using dependency injection to encourage modular and testable designs.