chore(security): apply golangci-lint fixes to lookup and security packages

This commit is contained in:
Hein
2026-10-01 13:21:00 +02:00
parent c9fa8c60f2
commit 2516fcb13d
16 changed files with 29 additions and 31 deletions
+3 -3
View File
@@ -429,9 +429,9 @@ func (b *Base) Insert(e lookup.Entity) *Insert { return &Insert{b: b, e: e} }
// Set adds assignments.
func (i *Insert) Set(as ...Assignment) *Insert { i.sets = append(i.sets, as...); return i }
func (i *Insert) colsAndArgs() ([]string, []any) {
cols := make([]string, len(i.sets))
args := make([]any, len(i.sets))
func (i *Insert) colsAndArgs() (cols []string, args []any) {
cols = make([]string, len(i.sets))
args = make([]any, len(i.sets))
for n, a := range i.sets {
cols[n] = i.b.colName(a.Col)
args[n] = i.b.arg(a.Val)
+2 -3
View File
@@ -68,10 +68,9 @@ func (p *Passkey) Store(ctx context.Context, rec lookup.PasskeyCredentialRecord)
}
// Get implements lookup.PasskeyStore.
func (p *Passkey) Get(ctx context.Context, credentialID string) (int, uint32, error) {
var userID int
func (p *Passkey) Get(ctx context.Context, credentialID string) (userID int, signCount uint32, err error) {
var count int64
err := p.do(func(q Querier) error {
err = p.do(func(q Querier) error {
return p.From(lookup.EntityUserPasskeyCredentials).Cols(lookup.PasskeyUserID, lookup.PasskeySignCount).
Where(Eq(lookup.PasskeyCredentialID, credentialID)).QueryRow(ctx, q, &userID, &count)
})