diff options
| author | cuishuang <imcusg@gmail.com> | 2025-10-10 11:47:13 +0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-10-10 14:38:27 -0700 |
| commit | 584a89fe7455470b09643b30bdc3cc55bb75a552 (patch) | |
| tree | 9966b2408323355a65ba9ef95018f6e3bfed86e6 /src | |
| parent | 69e82796322bbff60b522534a8a6eacb2bf1ebba (diff) | |
| download | go-584a89fe7455470b09643b30bdc3cc55bb75a552.tar.xz | |
all: omit unnecessary reassignment
The new version of Go has been optimized, and variables do not need
to be reassigned.
Change-Id: I0374b049271e53510f2b162f6821fb3595f2c8ff
Reviewed-on: https://go-review.googlesource.com/c/go/+/710835
Auto-Submit: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/encoding/base32/base32_test.go | 1 | ||||
| -rw-r--r-- | src/encoding/xml/marshal_test.go | 1 | ||||
| -rw-r--r-- | src/io/fs/readdir_test.go | 1 | ||||
| -rw-r--r-- | src/testing/iotest/reader_test.go | 1 |
4 files changed, 0 insertions, 4 deletions
diff --git a/src/encoding/base32/base32_test.go b/src/encoding/base32/base32_test.go index f5d3c49e38..6f8d564def 100644 --- a/src/encoding/base32/base32_test.go +++ b/src/encoding/base32/base32_test.go @@ -709,7 +709,6 @@ func TestBufferedDecodingPadding(t *testing.T) { } for _, testcase := range testcases { - testcase := testcase pr, pw := io.Pipe() go func() { for _, chunk := range testcase.chunks { diff --git a/src/encoding/xml/marshal_test.go b/src/encoding/xml/marshal_test.go index b8bce7170a..6c7e711aac 100644 --- a/src/encoding/xml/marshal_test.go +++ b/src/encoding/xml/marshal_test.go @@ -2561,7 +2561,6 @@ var closeTests = []struct { func TestClose(t *testing.T) { for _, tt := range closeTests { - tt := tt t.Run(tt.desc, func(t *testing.T) { var out strings.Builder enc := NewEncoder(&out) diff --git a/src/io/fs/readdir_test.go b/src/io/fs/readdir_test.go index 4c409ae7a0..b89706b893 100644 --- a/src/io/fs/readdir_test.go +++ b/src/io/fs/readdir_test.go @@ -72,7 +72,6 @@ func TestFileInfoToDirEntry(t *testing.T) { } for _, test := range tests { - test := test t.Run(test.path, func(t *testing.T) { fi, err := Stat(testFs, test.path) if err != nil { diff --git a/src/testing/iotest/reader_test.go b/src/testing/iotest/reader_test.go index 1d222372ca..cecfbfce49 100644 --- a/src/testing/iotest/reader_test.go +++ b/src/testing/iotest/reader_test.go @@ -238,7 +238,6 @@ func TestErrReader(t *testing.T) { } for _, tt := range cases { - tt := tt t.Run(tt.name, func(t *testing.T) { n, err := ErrReader(tt.err).Read(nil) if err != tt.err { |
