mirror of
https://github.com/golang/go
synced 2024-11-24 13:10:11 -07:00
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
This commit is contained in:
parent
fd693388e6
commit
108961b216
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user