From: Daniel Martí Date: Wed, 22 Sep 2021 13:59:42 +0000 (+0100) Subject: cmd/go: refer to the right package in a test X-Git-Tag: go1.18beta1~1215 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=4e308d73ba3610838305997b6f4793c4f4dcfc4e;p=gostls13.git cmd/go: refer to the right package in a test The test checks that two packages aren't non-test dependencies. There's a copy-paste typo, however. When net/http is unexpectedly found as a dependendency, we instead mention the other package in the error message. Change-Id: I3232c6252255c839e08efa048f2232c192d0fb85 Reviewed-on: https://go-review.googlesource.com/c/go/+/351372 Trust: Daniel Martí Reviewed-by: Jay Conrod Run-TryBot: Jay Conrod TryBot-Result: Go Bot --- diff --git a/src/cmd/go/internal/imports/scan_test.go b/src/cmd/go/internal/imports/scan_test.go index 2d245ee787..7e69c56513 100644 --- a/src/cmd/go/internal/imports/scan_test.go +++ b/src/cmd/go/internal/imports/scan_test.go @@ -33,7 +33,7 @@ func TestScan(t *testing.T) { } if p == "net/http" { // A test import but not an import - t.Errorf("json reported as importing encoding/binary but does not") + t.Errorf("json reported as importing net/http but does not") } } if !foundBase64 {