Thanks Bill,

I've got my head pretty well-wrapped around the fact that you're telling the compiler, "hey, I'm including a package that I am not going to actually reference throughout my code, but it has an init() function that I will use for setup" - I think, though, that coming from a non-Go background, there is a lot of O_O going on.

I think it's making a little bit more sense. I think I'm struggling to understand the difference between main() and init(), and there is really poor documentation about init. This behavior for Init is very quirky, especially for anyone coming from elsewhere to Go.

The best documentation I could find was this, and it's very brief and with minimal explanation: (actually your explanation in your previous post was substantially more enlightening than this documentation).

For me, and maybe this is just me personally, I would expect init() to be a function I would intentfully call at the top of my main() function, something like:

import (
dataSetup ""

func main() {
ds := dataSetup.init();

Which appears to have substantially less magic. I am under the impression that the quirky usage of the Init function is a Go programmer convention - it might be helpful to call it out as such. Considering the quirkiness of Go in general it might even be helpful to create some sort of "go programmer convention" inidicator, which, throughout the book, will call out things that might leave newcomers confused.

Thanks again! I appreciate the thorough explanation!
I have read through this section a couple of times and I am still not quite understanding the function of _ before a package name. I'm actually relatively familiar with Golang and have never come across this, so I thought I might bring attention to it maybe for some further explanation in a new version?

I was able to get some clarification from the Go docs at

I think it's a way of having "multiple mains", or other processes running within your main that are not actually dependencies, maybe? I know it says we'll get to it later but I was kind of hung up on just trying to grok at least a high-level conceptualization of what was going on

Message was edited by: