Unfortunately, we can't vendor cmd/cover because it needs to be installed globally into $GOTOOLDIR, and we can't automatically install it because writing to $GOTOOLDIR might require root permissions (e.g., Yum installs Go into /usr/lib64/golang).
Complicating matters, the cmd/cover import path changed in Go v1.4—the new path (golang.org/x/tools/cmd/cover) won't work with pre-1.4, and the old one (code.google.com/p/go.tools/cmd/cover) won't work with 1.4+.
Per @jrconlin's suggestion, we should detect if go tool cover is installed, and emit a friendly error if it's not.
Unfortunately, we can't vendor
cmd/cover
because it needs to be installed globally into$GOTOOLDIR
, and we can't automatically install it because writing to$GOTOOLDIR
might require root permissions (e.g., Yum installs Go into/usr/lib64/golang
).Complicating matters, the
cmd/cover
import path changed in Go v1.4—the new path (golang.org/x/tools/cmd/cover
) won't work with pre-1.4, and the old one (code.google.com/p/go.tools/cmd/cover
) won't work with 1.4+.Per @jrconlin's suggestion, we should detect if
go tool cover
is installed, and emit a friendly error if it's not.