Skip to content

Commit

Permalink
go/build: remove unused code in TestDependencies
Browse files Browse the repository at this point in the history
Change-Id: I7ccffbf96bd30f33bb42b6a2592962e2d4dda9fc
GitHub-Last-Rev: 2d6e214ac50bf505f8edf5ad8bf1c7f02e7b1194
GitHub-Pull-Request: golang/go#51231
Reviewed-on: https://go-review.googlesource.com/c/go/+/386374
Reviewed-by: mzh <[email protected]>
Trust: mzh <[email protected]>
Reviewed-by: Emmanuel Odeke <[email protected]>
  • Loading branch information
And-ZJ authored and odeke-em committed Mar 27, 2022
1 parent 0bbd05b commit 234283d
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/go/build/deps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 234283d

Please sign in to comment.