HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
google
wire
Go2018–2025
google / wire · Archived

wire

Compile-time Dependency Injection for Go

13Distinct people
13Mentions
0Explicit recommenders
14.4KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Compile-time Dependency Injection for Go

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 11:34:28 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year13 dated mentions

Observed mentions: 2018-12-02 14:44:35 UTC to 2025-09-12 21:55:56 UTC.

012342018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 2 mentions; 2 submissions, 0 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC220
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC404
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC202
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC211

What Hacker News says

1 sources
> and the HTTP package should not be polluted with assumptions about what (if any) data is being passed. I'm not talking about the HTTP package itself. In Java and C# you do something along the lines of // Java CompletableFuture<PagedResult<Contract>> getContracts(...); CompletableFuture<PagedResult<Client>> getClients...(...); CompletableFuture<PagedResult<Book>> getBooks...(...); // C# JsonSerializer.Deserialize<PagedResult<Contract>>(responseBody); JsonSerializer.Deserialize<PagedResult<Client>>(responseBody); JsonSerializer.Deserialize<PagedResult<Book>>(responseBody); And that's basically it. With Go you end up having fifteen identical PagedResult types for every single type that can be returned from the API because you can't parametrize anything: // Go type ContractsResult struct { Result []*entitie
Read the rest
s.Contract NextPageToken string } type ClientsResult struct { Result []*entities.Client NextPageToken string } type BooksResult struct { Result []*entities.Book NextPageToken string } > Or they use code generators, which is also pointed out in the article. Code generators are just bandaid for glaring holes in the language. Worse still, I don't know if you can even specify code generating tools in your go.mod. For example, wire's installation instructions say "you need to install wire globally and have it on your $GOPATH" [1] So your go build will just fail mysteriously until you have all the necessary tools installed. > Of course, anything more advanced would be greatly helped with generics That... that is exactly what I'm talking about. > Option types to avoid nil, Either types to replace the value/error tuples Indeed. I forgot about those :) Yup, that would be a great use case for generics. [1] https://github.com/google/wire
In Three Months of Go from a Haskeller’s perspective (2016)

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.