Skip to content

Commit 23c68a9

Browse files
committed
chore(lint): modernize chunk size clamp
The Go 1.26 lint configuration requires simple lower-bound clamps to use the built-in max helper. Keep the SQLite bind-variable safety floor unchanged while allowing the pull request lint job to pass.
1 parent 2a17e8f commit 23c68a9

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

internal/db/project_identity.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1850,10 +1850,7 @@ func (db *DB) ListPublishableSessionProjectIdentitySnapshots(
18501850
if sessionIDs == nil {
18511851
return query(nil)
18521852
}
1853-
chunkSize := maxSQLVars - len(projects) - len(excludeProjects)
1854-
if chunkSize < 1 {
1855-
chunkSize = 1
1856-
}
1853+
chunkSize := max(maxSQLVars-len(projects)-len(excludeProjects), 1)
18571854
var out []export.ProjectIdentityObservation
18581855
err := queryChunkedSize(sessionIDs, chunkSize, func(ids []string) error {
18591856
rows, err := query(ids)

0 commit comments

Comments
 (0)