mirror of
https://github.com/moby/moby.git
synced 2026-08-04 15:11:00 +00:00
daemon/logger/loggerutils: remove redundant capturing of loop vars (copyloopvar)
daemon/logger/loggerutils/logfile.go:809:3: The copy of the 'for' variable "ra" can be deleted (Go 1.22+) (copyloopvar)
ra := ra
^
daemon/logger/loggerutils/sharedtemp_test.go:117:4: The copy of the 'for' variable "i" can be deleted (Go 1.22+) (copyloopvar)
i := i
^
daemon/logger/loggerutils/sharedtemp_test.go:179:4: The copy of the 'for' variable "i" can be deleted (Go 1.22+) (copyloopvar)
i := i
^
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -806,7 +806,6 @@ func tailFiles(ctx context.Context, files []fileOpener, watcher *logger.LogWatch
|
||||
}()
|
||||
|
||||
for _, ra := range readers {
|
||||
ra := ra
|
||||
select {
|
||||
case <-watcher.WatchConsumerGone():
|
||||
return false
|
||||
|
||||
@@ -114,7 +114,6 @@ func TestSharedTempFileConverter(t *testing.T) {
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(3)
|
||||
for i := 0; i < 3; i++ {
|
||||
i := i
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
t.Logf("goroutine %v: enter", i)
|
||||
@@ -176,7 +175,6 @@ func TestSharedTempFileConverter(t *testing.T) {
|
||||
var done sync.WaitGroup
|
||||
done.Add(3)
|
||||
for i := 0; i < 3; i++ {
|
||||
i := i
|
||||
go func() {
|
||||
defer done.Done()
|
||||
t.Logf("goroutine %v: enter", i)
|
||||
|
||||
Reference in New Issue
Block a user