Understanding init in Go.md 460 B


title: Understanding init in Go date: 2020-11-16 08:44:24 categories: [programming] tags: [golang]

authors: sedlav

In Go, the predefined init() function sets off a piece of code to run before any other part of your package. This code will execute as soon as the package is imported, and can be used when you need your application to initialize in a specific state. I

Link