fix Interface2Interface *sql.RawBytes light copy bug
This commit is contained in:
parent
d485abba57
commit
926930b7c5
|
@ -23,8 +23,10 @@ func Interface2Interface(userLocation *time.Location, v interface{}) (interface{
|
||||||
case *sql.NullString:
|
case *sql.NullString:
|
||||||
return vv.String, nil
|
return vv.String, nil
|
||||||
case *sql.RawBytes:
|
case *sql.RawBytes:
|
||||||
if len([]byte(*vv)) > 0 {
|
if len(*vv) > 0 {
|
||||||
return []byte(*vv), nil
|
val := make([]byte, len(*vv))
|
||||||
|
copy(val, *vv)
|
||||||
|
return val, nil
|
||||||
}
|
}
|
||||||
return nil, nil
|
return nil, nil
|
||||||
case *sql.NullInt32:
|
case *sql.NullInt32:
|
||||||
|
|
Loading…
Reference in New Issue