diff options
Diffstat (limited to 'src/net')
| -rw-r--r-- | src/net/conn_test.go | 1 | ||||
| -rw-r--r-- | src/net/dial_test.go | 1 | ||||
| -rw-r--r-- | src/net/error_test.go | 1 | ||||
| -rw-r--r-- | src/net/http/fs_test.go | 1 | ||||
| -rw-r--r-- | src/net/http/httptest/recorder_test.go | 1 | ||||
| -rw-r--r-- | src/net/http/serve_test.go | 1 | ||||
| -rw-r--r-- | src/net/http/transport_test.go | 1 | ||||
| -rw-r--r-- | src/net/net_test.go | 6 | ||||
| -rw-r--r-- | src/net/server_test.go | 2 | ||||
| -rw-r--r-- | src/net/timeout_test.go | 1 | ||||
| -rw-r--r-- | src/net/unixsock_test.go | 2 |
11 files changed, 0 insertions, 18 deletions
diff --git a/src/net/conn_test.go b/src/net/conn_test.go index d1e1e7bf1c..87097e10ee 100644 --- a/src/net/conn_test.go +++ b/src/net/conn_test.go @@ -19,7 +19,6 @@ const someTimeout = 1 * time.Hour func TestConnAndListener(t *testing.T) { for i, network := range []string{"tcp", "unix", "unixpacket"} { - i, network := i, network t.Run(network, func(t *testing.T) { if !testableNetwork(network) { t.Skipf("skipping %s test", network) diff --git a/src/net/dial_test.go b/src/net/dial_test.go index 829b80c33a..07a9b46ddb 100644 --- a/src/net/dial_test.go +++ b/src/net/dial_test.go @@ -232,7 +232,6 @@ func TestDialParallel(t *testing.T) { } for i, tt := range testCases { - i, tt := i, tt t.Run(fmt.Sprint(i), func(t *testing.T) { dialTCP := func(ctx context.Context, network string, laddr, raddr *TCPAddr) (*TCPConn, error) { n := "tcp6" diff --git a/src/net/error_test.go b/src/net/error_test.go index ff25433621..8026144c3d 100644 --- a/src/net/error_test.go +++ b/src/net/error_test.go @@ -155,7 +155,6 @@ func TestDialError(t *testing.T) { d := Dialer{Timeout: someTimeout} for i, tt := range dialErrorTests { - i, tt := i, tt t.Run(fmt.Sprint(i), func(t *testing.T) { c, err := d.Dial(tt.network, tt.address) if err == nil { diff --git a/src/net/http/fs_test.go b/src/net/http/fs_test.go index 9b34ad080e..32fb696fee 100644 --- a/src/net/http/fs_test.go +++ b/src/net/http/fs_test.go @@ -1540,7 +1540,6 @@ func testServeFileRejectsInvalidSuffixLengths(t *testing.T, mode testMode) { } for _, tt := range tests { - tt := tt t.Run(tt.r, func(t *testing.T) { req, err := NewRequest("GET", cst.URL+"/index.html", nil) if err != nil { diff --git a/src/net/http/httptest/recorder_test.go b/src/net/http/httptest/recorder_test.go index 0996976514..9d1c4430c9 100644 --- a/src/net/http/httptest/recorder_test.go +++ b/src/net/http/httptest/recorder_test.go @@ -374,7 +374,6 @@ func TestRecorderPanicsOnNonXXXStatusCode(t *testing.T) { -100, 0, 99, 1000, 20000, } for _, badCode := range badCodes { - badCode := badCode t.Run(fmt.Sprintf("Code=%d", badCode), func(t *testing.T) { defer func() { if r := recover(); r == nil { diff --git a/src/net/http/serve_test.go b/src/net/http/serve_test.go index aee6288f3b..4a16ba02af 100644 --- a/src/net/http/serve_test.go +++ b/src/net/http/serve_test.go @@ -6701,7 +6701,6 @@ func testTimeoutHandlerSuperfluousLogs(t *testing.T, mode testMode) { } for _, tt := range tests { - tt := tt t.Run(tt.name, func(t *testing.T) { exitHandler := make(chan bool, 1) defer close(exitHandler) diff --git a/src/net/http/transport_test.go b/src/net/http/transport_test.go index 75dbd25d22..8ab4107fb7 100644 --- a/src/net/http/transport_test.go +++ b/src/net/http/transport_test.go @@ -4526,7 +4526,6 @@ func TestTransportContentEncodingCaseInsensitive(t *testing.T) { } func testTransportContentEncodingCaseInsensitive(t *testing.T, mode testMode) { for _, ce := range []string{"gzip", "GZIP"} { - ce := ce t.Run(ce, func(t *testing.T) { const encodedString = "Hello Gopher" ts := newClientServerTest(t, mode, HandlerFunc(func(w ResponseWriter, r *Request) { diff --git a/src/net/net_test.go b/src/net/net_test.go index 7269db8f2b..637c95540f 100644 --- a/src/net/net_test.go +++ b/src/net/net_test.go @@ -24,7 +24,6 @@ func TestCloseRead(t *testing.T) { t.Parallel() for _, network := range []string{"tcp", "unix", "unixpacket"} { - network := network t.Run(network, func(t *testing.T) { if !testableNetwork(network) { t.Skipf("network %s is not testable on the current platform", network) @@ -83,7 +82,6 @@ func TestCloseWrite(t *testing.T) { } for _, network := range []string{"tcp", "unix", "unixpacket"} { - network := network t.Run(network, func(t *testing.T) { if !testableNetwork(network) { t.Skipf("network %s is not testable on the current platform", network) @@ -185,7 +183,6 @@ func TestCloseWrite(t *testing.T) { func TestConnClose(t *testing.T) { t.Parallel() for _, network := range []string{"tcp", "unix", "unixpacket"} { - network := network t.Run(network, func(t *testing.T) { if !testableNetwork(network) { t.Skipf("network %s is not testable on the current platform", network) @@ -227,7 +224,6 @@ func TestConnClose(t *testing.T) { func TestListenerClose(t *testing.T) { t.Parallel() for _, network := range []string{"tcp", "unix", "unixpacket"} { - network := network t.Run(network, func(t *testing.T) { if !testableNetwork(network) { t.Skipf("network %s is not testable on the current platform", network) @@ -265,7 +261,6 @@ func TestListenerClose(t *testing.T) { func TestPacketConnClose(t *testing.T) { t.Parallel() for _, network := range []string{"udp", "unixgram"} { - network := network t.Run(network, func(t *testing.T) { if !testableNetwork(network) { t.Skipf("network %s is not testable on the current platform", network) @@ -349,7 +344,6 @@ func TestAcceptIgnoreAbortedConnRequest(t *testing.T) { func TestZeroByteRead(t *testing.T) { t.Parallel() for _, network := range []string{"tcp", "unix", "unixpacket"} { - network := network t.Run(network, func(t *testing.T) { if !testableNetwork(network) { t.Skipf("network %s is not testable on the current platform", network) diff --git a/src/net/server_test.go b/src/net/server_test.go index eb6b111f1f..cc9e985709 100644 --- a/src/net/server_test.go +++ b/src/net/server_test.go @@ -250,7 +250,6 @@ var udpServerTests = []struct { func TestUDPServer(t *testing.T) { for i, tt := range udpServerTests { - i, tt := i, tt t.Run(fmt.Sprint(i), func(t *testing.T) { if !testableListenArgs(tt.snet, tt.saddr, tt.taddr) { t.Skipf("skipping %s %s<-%s test", tt.snet, tt.saddr, tt.taddr) @@ -340,7 +339,6 @@ func TestUnixgramServer(t *testing.T) { } for i, tt := range unixgramServerTests { - i, tt := i, tt t.Run(fmt.Sprint(i), func(t *testing.T) { if !testableListenArgs("unixgram", tt.saddr, "") { t.Skipf("skipping unixgram %s<-%s test", tt.saddr, tt.caddr) diff --git a/src/net/timeout_test.go b/src/net/timeout_test.go index 0d009f6999..b7f8c613b4 100644 --- a/src/net/timeout_test.go +++ b/src/net/timeout_test.go @@ -180,7 +180,6 @@ func TestAcceptTimeout(t *testing.T) { } for _, timeout := range timeouts { - timeout := timeout t.Run(fmt.Sprintf("%v", timeout), func(t *testing.T) { t.Parallel() diff --git a/src/net/unixsock_test.go b/src/net/unixsock_test.go index 6758afddca..f6c5679f42 100644 --- a/src/net/unixsock_test.go +++ b/src/net/unixsock_test.go @@ -247,7 +247,6 @@ func TestUnixConnLocalAndRemoteNames(t *testing.T) { handler := func(ls *localServer, ln Listener) {} for _, laddr := range []string{"", testUnixAddr(t)} { - laddr := laddr taddr := testUnixAddr(t) ta, err := ResolveUnixAddr("unix", taddr) if err != nil { @@ -306,7 +305,6 @@ func TestUnixgramConnLocalAndRemoteNames(t *testing.T) { } for _, laddr := range []string{"", testUnixAddr(t)} { - laddr := laddr taddr := testUnixAddr(t) ta, err := ResolveUnixAddr("unixgram", taddr) if err != nil { |
