From d3a99550d9a7da444acd451c1aa839ed6ce426d8 Mon Sep 17 00:00:00 2001 From: Hein Date: Wed, 30 Sep 2026 13:46:03 +0200 Subject: [PATCH] fix(security): name GetTemplate results to satisfy gocritic --- pkg/security/provider.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/security/provider.go b/pkg/security/provider.go index e2683f9..d3acd08 100644 --- a/pkg/security/provider.go +++ b/pkg/security/provider.go @@ -83,7 +83,7 @@ func userIDScalar(ref any) (any, error) { // identifiers substituted in place; every {UserID} becomes a `?` placeholder // with the user reference bound as an argument, so user data never reaches the // SQL text. -func (m *RowSecurity) GetTemplate(pPrimaryKeyName string, pModelType reflect.Type) (string, []any, error) { +func (m *RowSecurity) GetTemplate(pPrimaryKeyName string, pModelType reflect.Type) (clause string, args []any, err error) { str := m.Template for placeholder, ident := range map[string]string{ @@ -108,7 +108,7 @@ func (m *RowSecurity) GetTemplate(pPrimaryKeyName string, pModelType reflect.Typ if err != nil { return "", nil, err } - args := make([]any, n) + args = make([]any, n) for i := range args { args[i] = uid }