Skip to content

Commit

Permalink
Simplify get Value
Browse files Browse the repository at this point in the history
As has checked v.Kind above, no need to use indirect to get the value
  • Loading branch information
michaelyou committed Mar 14, 2018
1 parent cf35089 commit 037fdd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sqlx.go
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ func (r *Rows) StructScan(dest interface{}) error {
return errors.New("must pass a pointer, not a value, to StructScan destination")
}

v = reflect.Indirect(v)
v = v.Elem()

if !r.started {
columns, err := r.Columns()
Expand Down

0 comments on commit 037fdd3

Please sign in to comment.