google/wire
View on GitHub ↗ ★ 14,377 Go archived
Compile-time Dependency Injection for Go
13 mentions on Hacker News by 13 people: 3 stories, 10 comments · first 2018-12-02 · latest 2025-09-12
20082026
-
…so now everything shuts down in order instead... well who knows :-D https://go.dev/blog/wire https://github.com/google/wire
comment by cientifico · 2025-05-05 · in Graceful Shutdown in Go: Practical Patterns -
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…
comment by eximius · 2024-04-30 · in Borgo is a statically typed language that compiles to Go -
…weird implicit things. I still wire dependencies up by hand, but I'm curious what others do. [1]: https://github.com/google/wire/tree/main
comment by Karrot_Kream · 2024-03-25 · in The case of a leaky goroutine -
As they didn't seem to link to it https://github.com/google/wire
comment by pledg · 2023-02-19 · in Google’s Wire: Automated Dependency Injection in Go -
I believe Go supports DI via Wire ( https://github.com/google/wire ).
comment by shadowgovt · 2022-03-30 · in Generics can make your Go code slower -
…golang, for some reason, wire[1] at least still gives you type safety and compile-time failures. 1. https://github.com/google/wire
comment by dcormier · 2022-02-27 · in Dependency injection in Go with Uber-go/fx -
For a slightly different take on this problem, check out Wire ( https://github.com/google/wire ).
comment by pbiswal · 2022-02-27 · in Dependency injection in Go with Uber-go/fx -
…"enterprise solutions" while the community adoption is at 694 projects importing wire: https://pkg.go.dev/github.com/google/wire?tab=importedby
comment by yencabulator · 2022-01-18 · in Jodd – The Unbearable Lightness of Java -
…give it up just to simplify the IDE's job. But the IDE having this functionality does matter. [0] https://github.com/google/wire [1] https://github.com/uber-go/fx
comment by closeparen · 2021-05-14 · in Show HN: We wrote a book about building business applications in Go -
…tuples Indeed. I forgot about those :) Yup, that would be a great use case for generics. [1] https://github.com/google/wire
comment by dmitriid · 2020-11-04 · in Three Months of Go from a Haskeller’s perspective (2016)