]> Cypherpunks.ru repositories - gostls13.git/commitdiff
go/build: remove unused code in TestDependencies
authorzhangjian <ZJ.Cosmos@gmail.com>
Tue, 22 Mar 2022 16:35:21 +0000 (16:35 +0000)
committerEmmanuel Odeke <emmanuel@orijtech.com>
Sun, 27 Mar 2022 20:23:47 +0000 (20:23 +0000)
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 <mzh@golangcn.org>
Trust: mzh <mzh@golangcn.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
src/go/build/deps_test.go

index 7b9826e0f2c1fe6d5670e307219c904e2aecc0b4..d541f0926dedf2850b5162442307a46427a1339c 100644 (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")