HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
codegangsta
inject
Go2013–2014
codegangsta / inject

inject

Dependency injection for go

3Distinct people
3Mentions
0Explicit recommenders
977GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Dependency injection for go

GitHub

Where it is used

No documented product use has been verified yet.

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 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 12:54:37 PM 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 week3 dated mentions

Observed mentions: 2013-11-14 09:23:26 UTC to 2014-05-20 06:09:59 UTC. Weeks start Monday, UTC.

0122013-11-11 00:00:00 UTC to 2013-11-18 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 commentsNov 112013-11-18 00:00:00 UTC to 2013-11-25 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-11-25 00:00:00 UTC to 2013-12-02 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-12-02 00:00:00 UTC to 2013-12-09 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-12-09 00:00:00 UTC to 2013-12-16 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-12-16 00:00:00 UTC to 2013-12-23 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-12-23 00:00:00 UTC to 2013-12-30 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-12-30 00:00:00 UTC to 2014-01-06 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-01-06 00:00:00 UTC to 2014-01-13 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-01-13 00:00:00 UTC to 2014-01-20 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-01-20 00:00:00 UTC to 2014-01-27 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-01-27 00:00:00 UTC to 2014-02-03 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-02-03 00:00:00 UTC to 2014-02-10 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-02-10 00:00:00 UTC to 2014-02-17 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsFeb 102014-02-17 00:00:00 UTC to 2014-02-24 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-02-24 00:00:00 UTC to 2014-03-03 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-03-03 00:00:00 UTC to 2014-03-10 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-03-10 00:00:00 UTC to 2014-03-17 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-03-17 00:00:00 UTC to 2014-03-24 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-03-24 00:00:00 UTC to 2014-03-31 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-03-31 00:00:00 UTC to 2014-04-07 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-04-07 00:00:00 UTC to 2014-04-14 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-04-14 00:00:00 UTC to 2014-04-21 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-04-21 00:00:00 UTC to 2014-04-28 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-04-28 00:00:00 UTC to 2014-05-05 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-05-05 00:00:00 UTC to 2014-05-12 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-05-12 00:00:00 UTC to 2014-05-19 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-05-19 00:00:00 UTC to 2014-05-26 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsMay 19

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
Nov 112013-11-11 00:00:00 UTC2013-11-18 00:00:00 UTC202
Nov 182013-11-18 00:00:00 UTC2013-11-25 00:00:00 UTC000
Nov 252013-11-25 00:00:00 UTC2013-12-02 00:00:00 UTC000
Dec 22013-12-02 00:00:00 UTC2013-12-09 00:00:00 UTC000
Dec 92013-12-09 00:00:00 UTC2013-12-16 00:00:00 UTC000
Dec 162013-12-16 00:00:00 UTC2013-12-23 00:00:00 UTC000
Dec 232013-12-23 00:00:00 UTC2013-12-30 00:00:00 UTC000
Dec 302013-12-30 00:00:00 UTC2014-01-06 00:00:00 UTC000
Jan 62014-01-06 00:00:00 UTC2014-01-13 00:00:00 UTC000
Jan 132014-01-13 00:00:00 UTC2014-01-20 00:00:00 UTC000
Jan 202014-01-20 00:00:00 UTC2014-01-27 00:00:00 UTC000
Jan 272014-01-27 00:00:00 UTC2014-02-03 00:00:00 UTC000
Feb 32014-02-03 00:00:00 UTC2014-02-10 00:00:00 UTC000
Feb 102014-02-10 00:00:00 UTC2014-02-17 00:00:00 UTC000
Feb 172014-02-17 00:00:00 UTC2014-02-24 00:00:00 UTC000
Feb 242014-02-24 00:00:00 UTC2014-03-03 00:00:00 UTC000
Mar 32014-03-03 00:00:00 UTC2014-03-10 00:00:00 UTC000
Mar 102014-03-10 00:00:00 UTC2014-03-17 00:00:00 UTC000
Mar 172014-03-17 00:00:00 UTC2014-03-24 00:00:00 UTC000
Mar 242014-03-24 00:00:00 UTC2014-03-31 00:00:00 UTC000
Mar 312014-03-31 00:00:00 UTC2014-04-07 00:00:00 UTC000
Apr 72014-04-07 00:00:00 UTC2014-04-14 00:00:00 UTC000
Apr 142014-04-14 00:00:00 UTC2014-04-21 00:00:00 UTC000
Apr 212014-04-21 00:00:00 UTC2014-04-28 00:00:00 UTC000
Apr 282014-04-28 00:00:00 UTC2014-05-05 00:00:00 UTC000
May 52014-05-05 00:00:00 UTC2014-05-12 00:00:00 UTC000
May 122014-05-12 00:00:00 UTC2014-05-19 00:00:00 UTC000
May 192014-05-19 00:00:00 UTC2014-05-26 00:00:00 UTC101

What Hacker News says

3 sources
I have been using Martini for over a year and we use it on our frontend API which has a non trivial number of endpoints, that contain a lot of code that has little to do with http routing (like I imagine most products do). Yes, Martini is non-idiomatic magic. Specifically codegangsta's 200-line inject (https://github.com/codegangsta/inject) library is most of Martini's magic. I think inject is rather clever (I've begin using it other projects), while non-idiomatic, and is a pretty neat way of handling middlewares - which I think is the most important point. In defense of Martini however I do appreciate that it leaves out boilerplate in many of my functions, and while my functions may look magical (who is calling this?), the routing setup and parameters provide a certain clarity. Concerning Stephen Searles post, I feel #2 & #3 are problems
Read the rest
with the library specifically and not Martini's design. In #2, the default return handler doesn't check if the return value satisfies io.Writer, which it should, but the default return handler can be fixed or swapped by the developer to make sure io.Writer is handled appropriately. #3 can be seen as any issue when your router allows you to specify Regex routes, and with that you have to ensure your routes are valid Regex. If you don't like it, you can specify to not take advantage of it or do whatever the popular Gorrilamux does. Now #1, is a tough one and overlooks what a lot of the other mini-frameworks have been trying to provide and what Stephen's muxchain doesn't provide - how do I manage all the various resources like database connections, config parameters, and the like. How can I write one "User" middleware, and provide the clients login details cleanly to my other middlewares and handlers? muxchain simply makes that the developers problem, so while it claims to provide everything Martini does, I don't really think it does. Gorrila (through Gorilla Context), stretchr's Goweb, Goji and others provide a `map[string]inteface{}.` Okay, so I still lose the type system, but now I have to litter my code with a ton of `realValue, ok := myMap["myValue"].(myType)`. The only simple, type-safe solution I've seen to this problem is Gocraft's web (https://github.com/gocraft/web), which I discovered long after Martini, and is much faster. So far of the frameworks that have been developed because of the whining that Martini has too much magic, only Gocraft has a rather clever way of dealing with this problem. Finally however, I'd imagine in most production applications the router is such a small part of the project I can't really suggest to someone that they should use Python+Twisted for their application if they like Martini. I can understand to a beginner or someone looking to learn Go, Martini may be poisonous, but in real, working, code I've rarely had to even think about Martini, and the rest of my code is fairly idiomatic and type safe. In short, while I do think Negroni is a great project, I think the whole reflection/injection might be a little too blown out of proportion. We will have a better picture for Martini at the end of the day once the Go ecosystem matures but its a little bit premature to say we should stop writing new code with Martini.
In Thoughts on Martini – Introducing Negroni

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.