imports: print dir of candidates in addition to import path

The import path is ambiguous in the presence of vendoring (e.g. golang/go#20610)

Change-Id: I22f372b233b8554e3d9210b383a7df7a6a0f3eee
Reviewed-on: https://go-review.googlesource.com/53470
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Axel Wagner 2017-08-05 19:29:30 +02:00 committed by Brad Fitzpatrick
parent a237aba5f5
commit 0f5d61c4c1
1 changed files with 1 additions and 1 deletions

View File

@ -776,7 +776,7 @@ func findImportGoPath(pkgName string, symbols map[string]bool, filename string)
sort.Sort(byImportPathShortLength(candidates))
if Debug {
for i, pkg := range candidates {
log.Printf("%s candidate %d/%d: %v", pkgName, i+1, len(candidates), pkg.importPathShort)
log.Printf("%s candidate %d/%d: %v in %v", pkgName, i+1, len(candidates), pkg.importPathShort, pkg.dir)
}
}