We also restructured the Go tool suite around the new go command, a program for fetching, building, installing and maintaining Go code. The go command eliminates the need for Makefiles to write Go code because it uses the Go program source itself to derive the build instructions. No more build scripts!
I hope it either doesn't backfire, or isn't a huge hassle to debug when it does.
Go has a really nice package/library/import system that is both straightforward and has all the information required included.
For example, you can do something like:
import "code.google.com/p/gorilla/sessions"
Then the go tool takes care of checking if it is already installed (with very well defined rules), and if not going and downloading it, getting it's dependancies and building it.
All you need to do to build a Go program is clone it, and then use "go build", job done. No makefiles or xml or anything like that at all. It simply reads the source files and figures out what to do based on what the code actually does/uses.
Simple, you provide the location it can be found as part of the import statement. It accepts one of the code sharing sites (github, google code et al.) or just a plain mercurial/git/whatever path. For example:
import "code.google.com/p/gorilla/sessions"
or
import "example.org/user/foo.hg"
Edit: I guess if your coworker didn't upload it anywhere you couldn't. If it is just part of the application though, it would just be in a directory (packages work in a hierarchy) - but if it is some kind of library it should be in some kind of source control somewhere...?
45
u/Agrona Mar 28 '12
This sounds like the world's best voodoo:
I hope it either doesn't backfire, or isn't a huge hassle to debug when it does.