Hi,
This is more of a go question than mgo, but the short version is. when you build a go program (not just file), go build will look for any file(s) with package "main" and build an exe (in windows), and it will put code from any other file and other package that is called from package main.
so, you don't really go build one by one the files, you "go build" your whole program. Which gets the name of the containing folder (unless you pass parameters but don't do that)
Hope that helps.
Diego