Remove unnecessary use of slice

This commit is contained in:
shubhendra 2021-02-25 15:19:30 +05:30
parent e6895ad95e
commit de0f6fc49a
No known key found for this signature in database
GPG Key ID: 9AFEF5C98D542137
2 changed files with 1 additions and 11 deletions

View File

@ -1,10 +0,0 @@
version = 1
test_patterns = ["**/*_test.go"]
[[analyzers]]
name = "go"
enabled = true
[analyzers.meta]
import_paths = ["github.com/go-gorm/gorm"]

View File

@ -142,7 +142,7 @@ func GetIdentityFieldValuesMap(reflectValue reflect.Value, fields []*Field) (map
if notZero {
dataKey := utils.ToStringKey(fieldValues...)
if _, ok := dataResults[dataKey]; !ok {
results = append(results, fieldValues[:])
results = append(results, fieldValues)
dataResults[dataKey] = []reflect.Value{elem}
} else {
dataResults[dataKey] = append(dataResults[dataKey], elem)