Using go test, build and install
With one exception, the go command takes arguments in the form of packages.
You can pass the package name(s) explicitly, eg.
text
go test github.com/hoisie/mustacheor implicitly
text
cd $GOPATH/src/github.com/hoisie/mustache
go test .By default, if no arguments are provided go test treats the current directory as a package, so in the second example, go test . is identical in function to
text
cd $GOPATH/src/github.com/hoisie/mustache
go testThe ability to pass a single file to go {build,test,install} is a degenerate case brought about by go run accepting a single .go file as its argument.
go run should be considered the single exception to the rule outlined above.