fix(security): name GetTemplate results to satisfy gocritic
Tests / Race Detector (push) Failing after 25s
Tests / Unit Tests (push) Failing after 25s
Tests / Integration Tests (push) Failing after 27s
Build , Vet Test, and Lint / Build (push) Successful in 1m3s
Build , Vet Test, and Lint / Run Vet Tests (1.24.x) (push) Successful in 1m30s
Build , Vet Test, and Lint / Lint Code (push) Successful in 1m31s
Build , Vet Test, and Lint / Run Vet Tests (1.23.x) (push) Successful in 1m31s

This commit is contained in:
Hein
2026-09-30 13:46:03 +02:00
parent 8a94d884e7
commit d3a99550d9
+2 -2
View File
@@ -83,7 +83,7 @@ func userIDScalar(ref any) (any, error) {
// identifiers substituted in place; every {UserID} becomes a `?` placeholder // identifiers substituted in place; every {UserID} becomes a `?` placeholder
// with the user reference bound as an argument, so user data never reaches the // with the user reference bound as an argument, so user data never reaches the
// SQL text. // 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 str := m.Template
for placeholder, ident := range map[string]string{ for placeholder, ident := range map[string]string{
@@ -108,7 +108,7 @@ func (m *RowSecurity) GetTemplate(pPrimaryKeyName string, pModelType reflect.Typ
if err != nil { if err != nil {
return "", nil, err return "", nil, err
} }
args := make([]any, n) args = make([]any, n)
for i := range args { for i := range args {
args[i] = uid args[i] = uid
} }