go/build: remove unused code in TestDependencies

Change-Id: I7ccffbf96bd30f33bb42b6a2592962e2d4dda9fc
GitHub-Last-Rev: 2d6e214ac5
GitHub-Pull-Request: golang/go#51231
Reviewed-on: https://go-review.googlesource.com/c/go/+/386374
Reviewed-by: mzh <mzh@golangcn.org>
Trust: mzh <mzh@golangcn.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
This commit is contained in:
zhangjian 2022-03-22 16:35:21 +00:00 committed by Emmanuel Odeke
parent 0bbd05b826
commit 234283d8ab
1 changed files with 0 additions and 15 deletions

View File

@ -626,21 +626,6 @@ func TestDependencies(t *testing.T) {
t.Errorf("unexpected dependency: %s imports %v", pkg, bad)
}
}
// depPath returns the path between the given from and to packages.
// It returns the empty string if there's no dependency path.
var depPath func(string, string) string
depPath = func(from, to string) string {
if sawImport[from][to] {
return from + " => " + to
}
for pkg := range sawImport[from] {
if p := depPath(pkg, to); p != "" {
return from + " => " + p
}
}
return ""
}
}
var buildIgnore = []byte("\n//go:build ignore")