While following a tutorial I hit a wall when it wanted me to run godoc. It was missing.
After a bit of searching around, I discovered:
- godoc has been changed for 1.2, so it's a separate library and binary.
- You have to get it through "go get", which won't work without GOPATH.
- Binary installations apparently include godoc? I installed from source, so it's not included by default.
I exported a GOPATH to my current application path /home/me/go_project/test. GOROOT was already set. (Note: GOPATH doesn't like to be set the same as GOROOT)
After that I ran "go get code.google.com/p/go.tools/cmd/godoc" and it dutifully installed the binary into my GOROOT/bin (yay!)
It also created a pkg installation under my /home/me/go_project/test/src/code.google.com/p... (Um...wat?)
I really don't need that code.google... bit under my test application; is there any reason Go would need that kept there? It doesn't alter anything in library paths or dependencies or anything, does it?
Essentially...can I just use the binary it put in GOROOT/bin and erase the stuff it put under my go_project application directory without affecting Go?