In the presence of vendored packages, the path found in a package
declaration may not be the path at which the package imported from
srcDir was found. Use the correct package path.
Change-Id: I74496c3cdf82a5dbd6a5bd189bb3cd0ca103fd52
Reviewed-on: https://go-review.googlesource.com/18460
Reviewed-by: Alan Donovan <adonovan@google.com>
return
}
- id = path
var noext string
switch {
default:
return
}
noext = strings.TrimSuffix(bp.PkgObj, ".a")
+ id = bp.ImportPath
case build.IsLocalImport(path):
// "./x" -> "/this/directory/x.ext", "/this/directory/x"
// does not support absolute imports
// "/x" -> "/x.ext", "/x"
noext = path
+ id = path
+ }
+
+ if false { // for debugging
+ if path != id {
+ fmt.Printf("%s -> %s\n", path, id)
+ }
}
// try extensions