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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user