mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2026-09-30 20:11:59 +00:00
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
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:
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user