Remove main function boiler plate using Dihedral dependency injection


(Max Gale) #1

Hey friends,

I’m the author of Dihedral, a compile-time dependency injection framework. It’s been a lot of fun to use in my Go services. I wanted to share it here to get some feedback on what would make it more useful.

For those unfamiliar, dependency injection is a type of library that allows organizing code into self-constructing components. This allows for easy code reuse without all the main function boilerplate. I plan on writing a more detailed blog post about why one would use DI, but, for those curious, I wrote a short blog post about why DI is a beautiful paradigm.