Skip to content

Commit 53d7130

Browse files
jongioCopilot
andcommitted
fix: preallocate FTS5 args slice (lint)
Co-authored-by: Copilot <[email protected]>
1 parent 0513dcd commit 53d7130

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

internal/data/store.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,8 @@ func (s *Store) SearchSessionsFTS(query string, limit int) ([]SearchResult, erro
815815
limit = defaultQueryLimit
816816
}
817817

818-
args := []any{escaped}
818+
args := make([]any, 0, 1+len(extraArgs)+1)
819+
args = append(args, escaped)
819820
args = append(args, extraArgs...)
820821
args = append(args, limit)
821822

0 commit comments

Comments
 (0)