fix: resolve ineffassign warnings in postgres SearchOptions
The argNum variable tracks parameter positions but the final value is unused. Added explicit acknowledgment to silence the linter. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -302,7 +302,7 @@ func (s *PostgresStore) GetChildren(ctx context.Context, revisionID int64, paren
|
||||
func (s *PostgresStore) SearchOptions(ctx context.Context, revisionID int64, query string, filters SearchFilters) ([]*Option, error) {
|
||||
var baseQuery string
|
||||
var args []interface{}
|
||||
argNum := 1
|
||||
var argNum int
|
||||
|
||||
// If the query looks like an option path (contains dots), prioritize name-based matching.
|
||||
if strings.Contains(query, ".") {
|
||||
@@ -333,7 +333,7 @@ func (s *PostgresStore) SearchOptions(ctx context.Context, revisionID int64, que
|
||||
if filters.Namespace != "" {
|
||||
baseQuery += fmt.Sprintf(" AND name LIKE $%d", argNum)
|
||||
args = append(args, filters.Namespace+"%")
|
||||
argNum++
|
||||
_ = argNum // silence ineffassign - argNum tracks position but final value unused
|
||||
}
|
||||
|
||||
if filters.HasDefault != nil {
|
||||
|
||||
Reference in New Issue
Block a user