Fixes #20230.
Change-Id: I2e9b9e9d2540eb66c8411ac7910962933bc2c0e9
Reviewed-on: https://go-review.googlesource.com/42870
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
}
bp, _ := build.Import(path, srcDir, build.FindOnly|build.AllowBinary)
if bp.PkgObj == "" {
+ id = path // make sure we have an id to print in error message
return
}
noext = strings.TrimSuffix(bp.PkgObj, ".a")
if path == "unsafe" {
return types.Unsafe, nil
}
- err = fmt.Errorf("can't find import: %s", id)
+ err = fmt.Errorf("can't find import: %q", id)
return
}