renamed local field var

This commit is contained in:
Gani Georgiev 2024-11-11 00:03:25 +02:00
parent 339399b0a4
commit 7119ff4716
1 changed files with 3 additions and 3 deletions

View File

@ -739,14 +739,14 @@ func (f *FileField) toSliceValue(raw any) []any {
} }
func (f *FileField) uniqueFiles(files []any) []any { func (f *FileField) uniqueFiles(files []any) []any {
existing := make(map[string]struct{}, len(files)) found := make(map[string]struct{}, len(files))
result := make([]any, 0, len(files)) result := make([]any, 0, len(files))
for _, fv := range files { for _, fv := range files {
name := f.getFileName(fv) name := f.getFileName(fv)
if _, ok := existing[name]; !ok { if _, ok := found[name]; !ok {
result = append(result, fv) result = append(result, fv)
existing[name] = struct{}{} found[name] = struct{}{}
} }
} }