2
0

Better number to string handling

Avoid ambiguity of stringWrapper implementing Int64Scanner and
Float64Scanner.
This commit is contained in:
Jack Christensen
2022-04-09 09:09:46 -05:00
parent 8cf6721d66
commit 829babcea9
13 changed files with 180 additions and 41 deletions
+1
View File
@@ -17,6 +17,7 @@ func TestFloat4Codec(t *testing.T) {
{float32(9999.99), new(float32), isExpectedEq(float32(9999.99))},
{pgtype.Float4{}, new(pgtype.Float4), isExpectedEq(pgtype.Float4{})},
{int64(1), new(int64), isExpectedEq(int64(1))},
{"1.23", new(string), isExpectedEq("1.23")},
{nil, new(*float32), isExpectedEq((*float32)(nil))},
})
}