2
0

Standardize casing for NULL in error messages

This commit is contained in:
Jack Christensen
2022-08-22 20:58:22 -05:00
parent 2e73d1e8ee
commit fe3a4f3150
13 changed files with 69 additions and 69 deletions
+2 -2
View File
@@ -86,10 +86,10 @@ func TestJSONCodecUnmarshalSQLNull(t *testing.T) {
// A string cannot scan a NULL.
str := "foobar"
err = conn.QueryRow(ctx, "select null::json").Scan(&str)
require.EqualError(t, err, "can't scan into dest[0]: cannot scan null into *string")
require.EqualError(t, err, "can't scan into dest[0]: cannot scan NULL into *string")
// A non-string cannot scan a NULL.
err = conn.QueryRow(ctx, "select null::json").Scan(&n)
require.EqualError(t, err, "can't scan into dest[0]: cannot scan null into *int")
require.EqualError(t, err, "can't scan into dest[0]: cannot scan NULL into *int")
})
}