• Dave Cheney's avatar
    go/build: give better explanation for "cannot find package" · 11d96dd7
    Dave Cheney authored
    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
    11d96dd7
build.go 27.5 KB