Go Time Go Time #147

Community Q&A

A community Q&A special. You asked the questions, and we discussed them live on air. A few example questions include “When is it okay to use init?”, “When should we use constructors?”, and “How should Go code be structured?”


Discussion

Sign in or Join to comment or subscribe

2020-09-29T13:23:27Z ago

The one dependency injection framework I have used that didn’t drive me bonkers was Guice. If I were hunting for a DI tool in Go, I’d look for one with similar attributes, but maybe not the same.

That said - My projects have been satisfied with a struct that has certain things in it, like a DB connection and often I store those as an interface it’s a dependency that “does something” or a struct of my own internal type if it’s just a piece of information that gets used in a few places (IE log level)

Anyway, good episode.

0:00 / 0:00