bp.BinDir = gobin
}
if err == nil && !isLocal && bp.ImportComment != "" && bp.ImportComment != path {
- err = fmt.Errorf("directory %s contains package %q", bp.Dir, bp.ImportComment)
+ err = fmt.Errorf("code in directory %s expects import %q", bp.Dir, bp.ImportComment)
}
p.load(stk, bp, err)
if p.Error != nil && len(importPos) > 0 {
if ./testgo build ./testdata/importcom/wrongplace.go 2>testdata/err; then
echo 'go build ./testdata/importcom/wrongplace.go suceeded'
ok=false
-elif ! grep 'wrongplace contains package "my/x"' testdata/err >/dev/null; then
+elif ! grep 'wrongplace expects import "my/x"' testdata/err >/dev/null; then
echo 'go build did not mention incorrect import:'
cat testdata/err
ok=false