Use pointer methods for all struct pgtypes
Now no need to no whether certain interfaces are implemented by struct or pointer to struct.
This commit is contained in:
+5
-5
@@ -11,11 +11,11 @@ import (
|
||||
|
||||
func TestJsonTranscode(t *testing.T) {
|
||||
testutil.TestSuccessfulTranscode(t, "json", []interface{}{
|
||||
pgtype.Json{Bytes: []byte("{}"), Status: pgtype.Present},
|
||||
pgtype.Json{Bytes: []byte("null"), Status: pgtype.Present},
|
||||
pgtype.Json{Bytes: []byte("42"), Status: pgtype.Present},
|
||||
pgtype.Json{Bytes: []byte(`"hello"`), Status: pgtype.Present},
|
||||
pgtype.Json{Status: pgtype.Null},
|
||||
&pgtype.Json{Bytes: []byte("{}"), Status: pgtype.Present},
|
||||
&pgtype.Json{Bytes: []byte("null"), Status: pgtype.Present},
|
||||
&pgtype.Json{Bytes: []byte("42"), Status: pgtype.Present},
|
||||
&pgtype.Json{Bytes: []byte(`"hello"`), Status: pgtype.Present},
|
||||
&pgtype.Json{Status: pgtype.Null},
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user