Install go with brew, and running the gotour

I was following the untill I got to the third step about that tells you that you can install the gotour on your system. After that I’ve installed the go language with brew by:

brew install hg
brew install go

Then I downloaded the gotour by:

go get

When I tried to launch the gotour it didnt recognise the command:

$ gotour
-bash: gotour: command not found


$ go gotour


$ ./gotour

So I tried to see the go path and it was empty,

echo $GOPATH

so I defined the GOPATH:

export GOPATH

Now I can run the gotour by runing


But I’m insecure about my go enviroment… wasn’t I suposed to be able to run gotour by

go run gotour

or just by typing (like is described on this website


I would like to know if i’m doing things the right way since I’m new to the go programing language.