dingo
Generated dependency injection containers in go (golang) (by sarulabs)
wire
Compile-time Dependency Injection for Go (by google)

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

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
dingo | wire | |
---|---|---|
3 | 32 | |
98 | 13,373 | |
- | 1.1% | |
2.2 | 2.0 | |
7 months ago | 7 months ago | |
Go | Go | |
MIT License | Apache License 2.0 |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
dingo
Posts with mentions or reviews of dingo.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-12-21.
wire
Posts with mentions or reviews of wire.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2025-02-05.
-
Dependency Injection in Go: Comparing Wire, Dig, Fx & More
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.
-
@Autowired magic in SpringBoot
Here is, in my opinion, a much better approach to the problem: https://github.com/google/wire
-
Borgo is a statically typed language that compiles to Go
code generation is a mostly disjoint topic from DI. Granted, some solutions like https://github.com/google/wire use code generation, but you're exactly right about their pitfalls. If your dev environment doesn't have good support for generated code, it is a nightmare. If you can goto-definition the generated code, then it is suddenly feasible, but perhaps still a bad choice.
- Injeção de dependência em Go
-
Question about dependency initialization
We use https://github.com/google/wire for every bigger project, take a look at it, it beautifully solves initialisation and also gives you a guideline on how to do it.
-
As a Go programmer, what design pattern, programming techniques have you actually used, implemented regularly in your workplace which made your life much easier?
Im by no means a "purist" in such things, I love my magic and QoL-features/libs, but havent seen something that is so easy to use in go, that I immediately wanted to add it. And to be fair, I only looked closely at https://github.com/google/wire , others I have just skipped - and I will be looking into uber-fx as mentioned in the other comment.
-
Config for production and mocking (db connections, http parsers etc)
If you have such a complex and deep dependency graph, and you don't want to manually maintain it, you could use some DI library to handle that for you. Something like https://github.com/google/wire for small-medium size stuff, or https://github.com/uber-go/fx for larger scale, more enterprise projects.
- Is it just me or does nobody really know what idiomatic Go is.
-
What's the best dependency injection framework / methodology for Golang for the enterprise?
Try https://github.com/google/wire. Compile time generated like dagger 2 in java.
-
Modern API design with Golang, PostgreSQL and Docker.
Most people probably do it by hand (I do). But otherwise, probably https://github.com/google/wire is the most popular, maybe followed by https://github.com/uber-go/fx.

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

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