]> Cypherpunks repositories - gostls13.git/commit
go/build: give better explanation for "cannot find package"
authorDave Cheney <dave@cheney.net>
Wed, 12 Dec 2012 10:38:52 +0000 (21:38 +1100)
committerDave Cheney <dave@cheney.net>
Wed, 12 Dec 2012 10:38:52 +0000 (21:38 +1100)
commit11d96dd7f51cf52f6cfea14e4123c21e75a3ff74
treed99dfe261384a612f276679a40c421f25e323fd1
parent5bdf40dccab1fec0660c4374be9046d82a1a004f
go/build: give better explanation for "cannot find package"

Fixes #4079.

Some example output:

% go install foo/bar
can't load package: package foo/bar: cannot find package "foo/bar" in any of:
        /home/dfc/go/src/pkg/foo/bar (from $GOROOT)
        /home/dfc/src/foo/bar (from $GOPATH)
        /home/dfc/src2/src/foo/bar

% GOPATH= go install foo/bar
can't load package: package foo/bar: cannot find package "foo/bar" in any of:
/home/dfc/go/src/pkg/foo/bar (from $GOROOT)
($GOPATH not set)

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6899057
src/cmd/go/test.bash
src/pkg/go/build/build.go