2
0

replace erroneous reflect.New with reflect.Zero in TryWrapStructScanPlan

This commit is contained in:
Felix Röhrich
2023-02-09 23:41:04 +01:00
committed by Jack Christensen
parent fa5fbed497
commit 5cd8468b99
2 changed files with 34 additions and 1 deletions
+1 -1
View File
@@ -1028,7 +1028,7 @@ func TryWrapStructScanPlan(target any) (plan WrappedScanPlanNextSetter, nextValu
var targetElemValue reflect.Value
if targetValue.IsNil() {
targetElemValue = reflect.New(targetValue.Type().Elem())
targetElemValue = reflect.Zero(targetValue.Type().Elem())
} else {
targetElemValue = targetValue.Elem()
}