Re:Dependency Injection with Go
by fishnchips on Monday July 28, 2014 @10:36AM
(#8096954)
I believe there are other ways:
http://commandcenter.blogspot.com/2014/01/self-referential-f...
And you should probably avoid situations where you suddenly need config objects in 'random places'. This could be a symptom of chaotic API design. But then again, whatever works for you.
Re:Dependency Injection with Go
by ExpiredLink on Monday July 28, 2014 @10:29AM
(#8096891)
Quite the contrary as repeatedly experienced in Java land.
DI code also tends to be more pleasant to test in my experience since it promotes loose coupling.