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
+2 -5
View File
@@ -47,7 +47,7 @@ func (randomOrderBlockPullReorderer) Reorder(blocks []protocol.BlockInfo) []prot
type standardBlockPullReorderer struct {
myIndex int
count int
shuffle func(interface{}) // Used for test
shuffle func(any) // Used for test
}
func newStandardBlockPullReorderer(id protocol.DeviceID, otherDevices []protocol.DeviceID) *standardBlockPullReorderer {
@@ -116,10 +116,7 @@ func chunk(blocks []protocol.BlockInfo, partCount int) [][]protocol.BlockInfo {
chunkSize := (count + partCount - 1) / partCount
parts := make([][]protocol.BlockInfo, 0, partCount)
for i := 0; i < count; i += chunkSize {
end := i + chunkSize
if end > count {
end = count
}
end := min(i+chunkSize, count)
parts = append(parts, blocks[i:end])
}
return parts