Skip to content

Commit

Permalink
create pointer if not initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
Di Weng committed Feb 23, 2022
1 parent f9afcb6 commit 502f43f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kusto/data/value/dynamic.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ func (d Dynamic) Convert(v reflect.Value) error {
if v.Type().Kind() != reflect.Ptr {
v.Set(valueToSet)
} else {
if v.IsZero() {
v.Set(reflect.New(valueToSet.Type()))
}
v.Elem().Set(valueToSet)
}
return nil
Expand Down

0 comments on commit 502f43f

Please # to comment.