Taras Sheremeta 🇺🇦 Profile picture
Software Developer, Tech Lead, Podcaster. I'm working with #Golang, #Java and #Kafka. I believe that technologies are drivers of the world.
Feb 5, 2019 12 tweets 4 min read
Thread about why I said that init() functions in #Golang are evil...

#Golang #Go #Init #Code 1. Init() functions are run before any function in the package, from the first view, it is good to use them as package constructor. In reality, package initializing via init() function will add complexity for your tests, understanding application flows, extendibility of code, etc