aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing.go
diff options
context:
space:
mode:
authorJake Bailey <jacob.b.bailey@gmail.com>2025-03-21 22:34:52 -0700
committerGopher Robot <gobot@golang.org>2025-03-24 10:16:54 -0700
commit710476495a94892f1a07ca4a253101d1e00b4dec (patch)
tree6624984c5cc55b9be35658b05170230cfd6b4ace /src/testing/testing.go
parent2d2bcdd2ad83ba93e61747417d6865cdd88b32fe (diff)
downloadgo-710476495a94892f1a07ca4a253101d1e00b4dec.tar.xz
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 <adonovan@google.com> Auto-Submit: Alan Donovan <adonovan@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Diffstat (limited to 'src/testing/testing.go')
-rw-r--r--src/testing/testing.go1
1 files changed, 0 insertions, 1 deletions
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()
// ...