What's the best dependency injection framework / methodology for Golang for the enterprise?

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

Nutrient - The #1 PDF SDK Library
Bad PDFs = bad UX. Slow load times, broken annotations, clunky UX frustrates users. Nutrient’s PDF SDKs gives seamless document experiences, fast rendering, annotations, real-time collaboration, 100+ features. Used by 10K+ devs, serving ~half a billion users worldwide. Explore the SDK for free.
nutrient.io
featured
CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
  1. wire

    Compile-time Dependency Injection for Go

    For big project you need DI framework, and I suggest Google Wire (https://github.com/google/wire)

  2. Nutrient

    Nutrient - The #1 PDF SDK Library. Bad PDFs = bad UX. Slow load times, broken annotations, clunky UX frustrates users. Nutrient’s PDF SDKs gives seamless document experiences, fast rendering, annotations, real-time collaboration, 100+ features. Used by 10K+ devs, serving ~half a billion users worldwide. Explore the SDK for free.

    Nutrient logo
  3. dig

    A reflection based dependency injection toolkit for Go.

    Interesting, one of my friends works at a big tech company and they said they passed on Wire and ultimately decided on Uber Dig https://github.com/uber-go/dig. But looking at that lib it seems a bit anti-paradigm of the goal of the Golang language (no magic/obfuscated code running in the background, what you see is what you get style coding)

  4. fx

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

    We’re happy with https://github.com/uber-go/fx

  5. dingo

    Generated dependency injection containers in go (golang) (by sarulabs)

  6. boot

    Configuration and dependency injection (by boot-go)

  7. go-kit

    A standard library for microservices.

    My company uses go-kit

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

  • Dependency Injection in Go: Comparing Wire, Dig, Fx & More

    5 projects | dev.to | 5 Feb 2025
  • Do: A dependency injection toolkit based on Go 1.18 Generics

    1 project | news.ycombinator.com | 24 Jul 2024
  • @Autowired magic in SpringBoot

    1 project | dev.to | 16 Jun 2024
  • Dependency Injection: A Straightforward Implementation in Golang

    1 project | dev.to | 10 May 2024
  • Injeção de dependência em Go

    2 projects | dev.to | 28 Feb 2024

Did you know that Go is
the 4th most popular programming language
based on number of references?