I\'ve tried to find a precise explanation of what the init()
function does in Go. I read what Effective Go says but I was unsure if I understood fully what it s
https://golang.org/ref/mem#tmp_4
Program initialization runs in a single goroutine, but that goroutine may create other goroutines, which run concurrently.
If a package p imports package q, the completion of q's init functions happens before the start of any of p's.
The start of the function main.main happens after all init functions have finished.