Skip to content

Commit 92e5f46

Browse files
committed
tests/NullInt.Scan: remove support for int{,8,16,32}
Those types are not driver.Value, but int was necessary because sqlmock was not properly using pure driver.Value before. Now that I fixed the issue in previous commit, we can remove the old hack.
1 parent 896b89a commit 92e5f46

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

stubs_test.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,6 @@ func (ni *NullInt) Scan(value interface{}) error {
2323
switch v := value.(type) {
2424
case nil:
2525
ni.Integer, ni.Valid = 0, false
26-
27-
// FIXME int, int8, int16, int32 types are handled here but that should not
28-
// be necessary: only int64 is a driver.Value
29-
// Unfortunately, the sqlmock testsuite currently relies on that because
30-
// sqlmock doesn't properly limits itself internally to pure driver.Value.
31-
case int:
32-
ni.Integer, ni.Valid = v, true
33-
case int8:
34-
ni.Integer, ni.Valid = int(v), true
35-
case int16:
36-
ni.Integer, ni.Valid = int(v), true
37-
case int32:
38-
ni.Integer, ni.Valid = int(v), true
39-
4026
case int64:
4127
const maxUint = ^uint(0)
4228
const minUint = 0

0 commit comments

Comments
 (0)