diff --git a/convert/interface.go b/convert/interface.go index b0f28c81..f2df3ca8 100644 --- a/convert/interface.go +++ b/convert/interface.go @@ -23,8 +23,10 @@ func Interface2Interface(userLocation *time.Location, v interface{}) (interface{ case *sql.NullString: return vv.String, nil case *sql.RawBytes: - if len([]byte(*vv)) > 0 { - return []byte(*vv), nil + if len(*vv) > 0 { + val := make([]byte, len(*vv)) + copy(val, *vv) + return val, nil } return nil, nil case *sql.NullInt32: