chore: style fixes from go fix (#10846)

Just `go fix ./...`

Signed-off-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
Jakob Borg
2026-08-05 20:23:22 +02:00
committed by GitHub
parent 946e2b83a1
commit 8ea09c0094
144 changed files with 211 additions and 315 deletions
+1 -1
View File
@@ -122,7 +122,7 @@ func BenchmarkValidate(b *testing.B) {
r := mrand.New(mrand.NewSource(0x136bea689e851))
// Valid blocks.
for i := 0; i < blocksPerType; i++ {
for range blocksPerType {
var b block
b.data = make([]byte, 128<<10)
r.Read(b.data)
+1 -1
View File
@@ -125,7 +125,7 @@ func (f fakeInfo) IsRegular() bool { return !f.IsDir() }
func (fakeInfo) IsSymlink() bool { return false }
func (fakeInfo) Owner() int { return 0 }
func (fakeInfo) Group() int { return 0 }
func (fakeInfo) Sys() interface{} { return nil }
func (fakeInfo) Sys() any { return nil }
type fakeFile struct {
name string
+1 -1
View File
@@ -181,7 +181,7 @@ func (w *walker) walk(ctx context.Context) chan ScanResult {
current := progress.Total()
rate := progress.Rate()
l.Debugf("%v: Walk %s %s current progress %d/%d at %.01f MiB/s (%d%%)", w, w.Folder, w.Subs, current, total, rate/1024/1024, current*100/total)
w.EventLogger.Log(events.FolderScanProgress, map[string]interface{}{
w.EventLogger.Log(events.FolderScanProgress, map[string]any{
"folder": w.Folder,
"current": current,
"total": total,
+2 -2
View File
@@ -979,11 +979,11 @@ func testConfig() (Config, context.CancelFunc) {
func BenchmarkWalk(b *testing.B) {
testFs := fs.NewFilesystem(fs.FilesystemTypeFake, rand.String(32))
for i := 0; i < 100; i++ {
for i := range 100 {
if err := testFs.Mkdir(fmt.Sprintf("dir%d", i), 0o755); err != nil {
b.Fatal(err)
}
for j := 0; j < 100; j++ {
for j := range 100 {
if fd, err := testFs.Create(fmt.Sprintf("dir%d/file%d", i, j)); err != nil {
b.Fatal(err)
} else {