chore: build with Go 1.26; use Go 1.25 features (#10570)

WaitGroup.Go and built-in gomaxprocs handling.

Signed-off-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
Jakob Borg
2026-02-11 10:41:38 +00:00
committed by GitHub
parent 478d8a007d
commit dc2a77ab8e
44 changed files with 175 additions and 289 deletions
+2 -4
View File
@@ -198,10 +198,8 @@ func TryMigrateDatabase(ctx context.Context, deleteRetention time.Duration) erro
fis := make(chan protocol.FileInfo, 50)
var writeErr error
var wg sync.WaitGroup
wg.Add(1)
writerDone := make(chan struct{})
go func() {
defer wg.Done()
wg.Go(func() { //nolint:contextcheck
defer close(writerDone)
var batch []protocol.FileInfo
files, blocks := 0, 0
@@ -238,7 +236,7 @@ func TryMigrateDatabase(ctx context.Context, deleteRetention time.Duration) erro
slog.Info("Migrated folder", "folder", folder, "files", files, "blocks", blocks, "duration", d.Truncate(time.Second), "filesrate", float64(files)/d.Seconds())
totFiles += files
totBlocks += blocks
}()
})
// Iterate the existing files
fs, err := olddb.NewFileSet(folder, ll)