Is dependency injection in Go a thing?

This page summarizes the projects mentioned and recommended in the original post on

Our great sponsors
  • Scout APM - Truly a developer’s best friend
  • SonarQube - Static code analysis for 29 languages.
  • - Download’s Tech Salary Report
  • fx

    A dependency injection based application framework for Go. (by uber-go)

    I can't imagine starting any new project in Go without uber-go/fx.

  • dig

    A reflection based dependency injection toolkit for Go.

    It's a library to help with DI, by Uber:

  • Scout APM

    Truly a developer’s best friend. Scout APM is great for developers who want to find and fix performance issues in their applications. With Scout, we'll take care of the bugs so you can focus on building great things 🚀.

  • golang-runtime-di

    a runtime dependency injection framework for golang.

    I wrote (and I am using) a reflection based library like dig:

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts