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

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

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
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. wire

    Compile-time Dependency Injection for Go

    Wire is a compile-time dependency injection tool developed by Google. It generates Go code that manually wires dependencies before compilation, ensuring that there is no runtime overhead.

  2. CodeRabbit

    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 logo
  3. dig

    A reflection based dependency injection toolkit for Go.

    Dig is a runtime dependency injection library developed by Uber. Unlike Wire, which resolves dependencies at compile time, Dig resolves them at runtime, making it more flexible but with a slight performance cost.

  4. fx

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

    Fx is a framework built on top of Dig that provides structured dependency injection along with lifecycle management. It simplifies the setup of large applications by managing logging, dependency injection, and application startup.

  5. go-cloud

    The Go Cloud Development Kit (Go CDK): A library and tools for open cloud development in Go.

    GoCloud Wire is an extension of Wire that integrates with the Go Cloud Development Kit (Go CDK). It is optimized for dependency injection in cloud-native applications.

  6. Dagger2

    A fast dependency injector for Android and Java.

    Dagger is a compile-time dependency injection tool widely used in Java and Kotlin. Although not officially supported in Go, some developers have experimented with using it.

  7. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
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

  • 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
  • Gorilla,wow

    2 projects | /r/golang | 9 Jul 2023