auto adjust code

This commit is contained in:
Christopher Homberger
2026-02-22 20:58:46 +01:00
parent 949a40c7a5
commit d187ac2fc1
86 changed files with 617 additions and 617 deletions

View File

@@ -3,6 +3,7 @@ package filecollector
import (
"archive/tar"
"context"
"errors"
"fmt"
"io"
"io/fs"
@@ -134,7 +135,7 @@ func (fc *FileCollector) CollectFiles(ctx context.Context, submodulePath []strin
if ctx != nil {
select {
case <-ctx.Done():
return fmt.Errorf("copy cancelled")
return errors.New("copy cancelled")
default:
}
}

View File

@@ -27,7 +27,7 @@ func (mfs *memoryFs) walk(root string, fn filepath.WalkFunc) error {
if err != nil {
return err
}
for i := 0; i < len(dir); i++ {
for i := range dir {
filename := filepath.Join(root, dir[i].Name())
err = fn(filename, dir[i], nil)
if dir[i].IsDir() {