Commit 108961b2 authored by Rob Pike's avatar Rob Pike

cmd/go: slightly less confusing error message

If the argument to go fix isn't a package directory, the message said nothing helpful.
Now it at least says a package couldn't be found.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5577072
parent fd693388
......@@ -407,7 +407,7 @@ func packages(args []string) []*Package {
for _, arg := range args {
pkg := loadPackage(arg, &stk)
if pkg.Error != nil {
errorf("%s", pkg.Error)
errorf("can't load package: %s", pkg.Error)
continue
}
pkgs = append(pkgs, pkg)
......@@ -437,7 +437,7 @@ func packagesForBuild(args []string) []*Package {
printed := map[*PackageError]bool{}
for _, pkg := range pkgs {
if pkg.Error != nil {
errorf("%s", pkg.Error)
errorf("can't load package: %s", pkg.Error)
}
for _, err := range pkg.DepsErrors {
// Since these are errors in dependencies,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment