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:
Sebastiaan van Stijn
2024-11-12 13:41:21 +01:00
parent 67d91e7622
commit ff97ff8320
2 changed files with 0 additions and 3 deletions

View File

@@ -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

View File

@@ -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)