Init functions in Go are executed during package initialization, which can complicate testing. Overusing init functions for activities like struct instantiation or dependency initialization can result in code that is hard to test and maintain. It's recommended to use a constructor like New() instead.
1 Comment
Sort: