From a99d993675a05fa9931312506dd622deff73638f Mon Sep 17 00:00:00 2001 From: rubin <86082354+rubensantoniorosa2704@users.noreply.github.com> Date: Fri, 31 Oct 2025 21:14:33 -0300 Subject: [PATCH] fix: replace manual loop with copy() builtin Replaces manual slice copy loop with built-in copy() function to fix S1001 linter warning: should use copy(to, from) instead of a loop. --- internal/codegen/golang/result.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/internal/codegen/golang/result.go b/internal/codegen/golang/result.go index 515d0a654f..0820488f9d 100644 --- a/internal/codegen/golang/result.go +++ b/internal/codegen/golang/result.go @@ -141,9 +141,7 @@ func newGoEmbed(embed *plugin.Identifier, structs []Struct, defaultSchema string } fields := make([]Field, len(s.Fields)) - for i, f := range s.Fields { - fields[i] = f - } + copy(fields, s.Fields) return &goEmbed{ modelType: s.Name,