Run go fix

This commit is contained in:
2026-02-27 14:40:26 +01:00
parent a1db8263d7
commit a418abc7d5
8 changed files with 22 additions and 36 deletions

View File

@@ -65,6 +65,7 @@ import (
"math"
"os"
"path"
"strings"
"sync"
"sync/atomic"
@@ -114,9 +115,7 @@ type walFileState struct {
// and appends binary WAL records to per-host current.wal files.
// Also handles WAL rotation requests from the checkpoint goroutine.
func WALStaging(wg *sync.WaitGroup, ctx context.Context) {
wg.Add(1)
go func() {
defer wg.Done()
wg.Go(func() {
if Keys.Checkpoints.FileFormat == "json" {
return
@@ -220,7 +219,7 @@ func WALStaging(wg *sync.WaitGroup, ctx context.Context) {
processRotate(req)
}
}
}()
})
}
// RotateWALFiles sends rotation requests for the given host directories
@@ -478,11 +477,12 @@ func joinSelector(sel []string) string {
if len(sel) == 0 {
return ""
}
result := sel[0]
var result strings.Builder
result.WriteString(sel[0])
for i := 1; i < len(sel); i++ {
result += "\x00" + sel[i]
result.WriteString("\x00" + sel[i])
}
return result
return result.String()
}
// ToCheckpointWAL writes binary snapshot files for all hosts in parallel.