3 ms·
What do you mean which ones? I am talking about dependency injection as a technique/pattern. In Go you can just do it without importing anything. Please read:
by neoasterisk 9y ago
What do you mean which ones? I am talking about dependency injection as a technique/pattern. In Go you can just do it without importing anything.
Please read:
https://medium.com/@benbjohnson/standard-package-layout-7cdbc8391fc1#db5a https://medium.com/@benbjohnson/standard-package-layout-7cdb...
(I've linked to the exact point in the article where it talks about DI but you might want to read the rest as well.)
- Groxx 9y agoYeah, it's widespread as a hand-coded thing. It has to be - you essentially have no choice in Go for even basic things like tests. But that just means that everyone rolls their own thing by hand, with widely-varying feature-sets, method names, bugs, etc. DI frameworks are very much nicer for interop between a bunch of libs.