Skip to content

Commit

Permalink
Replace old reflect.Ptr with new name reflect.Pointer (#362)
Browse files Browse the repository at this point in the history
  • Loading branch information
haoxins authored Jan 17, 2025
1 parent b3c925a commit e8eeb1c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions result_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ func (res ResultSet) Scan(v interface{}) error {

rv := reflect.ValueOf(v)
switch {
case rv.Kind() != reflect.Ptr:
case rv.Kind() != reflect.Pointer:
if t := reflect.TypeOf(v); t != nil {
return fmt.Errorf("scan: Scan(non-pointer %s)", t)
}
Expand Down Expand Up @@ -339,7 +339,7 @@ func (res ResultSet) scanRow(row *nebula.Row, colNames []string, rowType reflect
rowVals := row.GetValues()

var result reflect.Value
if rowType.Kind() == reflect.Ptr {
if rowType.Kind() == reflect.Pointer {
result = reflect.New(rowType.Elem())
} else {
result = reflect.New(rowType).Elem()
Expand Down Expand Up @@ -392,7 +392,7 @@ func scanListCol(vals []*nebula.Value, listVal reflect.Value, sliceType reflect.
listCol = reflect.Append(listCol, ele)
}
listVal.Set(listCol)
case reflect.Ptr:
case reflect.Pointer:
var listCol = reflect.MakeSlice(sliceType, 0, len(vals))
for _, val := range vals {
ele := reflect.New(sliceType.Elem().Elem())
Expand Down

0 comments on commit e8eeb1c

Please sign in to comment.