56
60
{s: someTime, d: &scantime, wanttime: someTime},
63
{s: "string", d: &scanstr, wantstr: "string"},
59
64
{s: []byte("byteslice"), d: &scanstr, wantstr: "byteslice"},
60
65
{s: 123, d: &scanstr, wantstr: "123"},
61
66
{s: int8(123), d: &scanstr, wantstr: "123"},
66
71
{s: uint64(123), d: &scanstr, wantstr: "123"},
67
72
{s: 1.5, d: &scanstr, wantstr: "1.5"},
75
{s: nil, d: &scanbytes, wantbytes: nil},
76
{s: "string", d: &scanbytes, wantbytes: []byte("string")},
77
{s: []byte("byteslice"), d: &scanbytes, wantbytes: []byte("byteslice")},
78
{s: 123, d: &scanbytes, wantbytes: []byte("123")},
79
{s: int8(123), d: &scanbytes, wantbytes: []byte("123")},
80
{s: int64(123), d: &scanbytes, wantbytes: []byte("123")},
81
{s: uint8(123), d: &scanbytes, wantbytes: []byte("123")},
82
{s: uint16(123), d: &scanbytes, wantbytes: []byte("123")},
83
{s: uint32(123), d: &scanbytes, wantbytes: []byte("123")},
84
{s: uint64(123), d: &scanbytes, wantbytes: []byte("123")},
85
{s: 1.5, d: &scanbytes, wantbytes: []byte("1.5")},
88
{s: nil, d: &scanraw, wantraw: nil},
89
{s: []byte("byteslice"), d: &scanraw, wantraw: RawBytes("byteslice")},
90
{s: 123, d: &scanraw, wantraw: RawBytes("123")},
91
{s: int8(123), d: &scanraw, wantraw: RawBytes("123")},
92
{s: int64(123), d: &scanraw, wantraw: RawBytes("123")},
93
{s: uint8(123), d: &scanraw, wantraw: RawBytes("123")},
94
{s: uint16(123), d: &scanraw, wantraw: RawBytes("123")},
95
{s: uint32(123), d: &scanraw, wantraw: RawBytes("123")},
96
{s: uint64(123), d: &scanraw, wantraw: RawBytes("123")},
97
{s: 1.5, d: &scanraw, wantraw: RawBytes("1.5")},
69
99
// Strings to integers
70
100
{s: "255", d: &scanuint8, wantuint: 255},
71
101
{s: "256", d: &scanuint8, wanterr: `converting string "256" to a uint8: strconv.ParseUint: parsing "256": value out of range`},