From 710476495a94892f1a07ca4a253101d1e00b4dec Mon Sep 17 00:00:00 2001 From: Jake Bailey Date: Fri, 21 Mar 2025 22:34:52 -0700 Subject: [PATCH] testing: remove redundant variable capture from subtest example Loop variable capturing hasn't been needed like this since Go 1.21; remove it from the example. Change-Id: I231dcfdb57832e32d524f156a605ba36d1c9d6d9 Reviewed-on: https://go-review.googlesource.com/c/go/+/660176 Reviewed-by: Alan Donovan Auto-Submit: Alan Donovan LUCI-TryBot-Result: Go LUCI Reviewed-by: Dmitri Shuralyov --- src/testing/testing.go | 1 - 1 file changed, 1 deletion(-) diff --git a/src/testing/testing.go b/src/testing/testing.go index 471046e89d..5b0a33f28d 100644 --- a/src/testing/testing.go +++ b/src/testing/testing.go @@ -345,7 +345,6 @@ // // func TestGroupedParallel(t *testing.T) { // for _, tc := range tests { -// tc := tc // capture range variable // t.Run(tc.Name, func(t *testing.T) { // t.Parallel() // ... -- 2.51.0