1
0
mirror of https://github.com/DATA-DOG/go-sqlmock.git synced 2025-03-23 21:09:19 +02:00

tests/Null{Int,Time}: do not change the value in case of error

Do not touch the existing value in case of error.
No capital on error message.
This commit is contained in:
Olivier Mengué 2018-07-12 11:58:55 +02:00
parent 9119b1dbff
commit 87bbc72050

View File

@ -54,8 +54,7 @@ func (ni *NullInt) Scan(value interface{}) error {
}
ni.Integer, ni.Valid = n, true
default:
ni.Valid = false
return fmt.Errorf("Can't convert %T to integer", value)
return fmt.Errorf("can't convert %T to integer", value)
}
return nil
}
@ -76,8 +75,7 @@ func (nt *NullTime) Scan(value interface{}) error {
case time.Time:
nt.Time, nt.Valid = v, true
default:
nt.Valid = false
return fmt.Errorf("Can't convert %T to time.Time", value)
return fmt.Errorf("can't convert %T to time.Time", value)
}
return nil
}