How to build Golang executable with a different name other than the Golang package name?
Just use this:
go build -o [your desired executable name]
You can specify the executable name using the -o switch with
For your example it would look something like:
cd $GOPATH/github.com/username/go-foobar && go build -o foobar .