2
0

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:
Jack Christensen
2017-04-14 13:08:05 -05:00
parent f418255c24
commit a8c350c77d
67 changed files with 302 additions and 302 deletions
+4 -4
View File
@@ -25,8 +25,8 @@ func (dst *GenericBinary) DecodeBinary(ci *ConnInfo, src []byte) error {
return (*Bytea)(dst).DecodeBinary(ci, src)
}
func (src GenericBinary) EncodeBinary(ci *ConnInfo, w io.Writer) (bool, error) {
return (Bytea)(src).EncodeBinary(ci, w)
func (src *GenericBinary) EncodeBinary(ci *ConnInfo, w io.Writer) (bool, error) {
return (*Bytea)(src).EncodeBinary(ci, w)
}
// Scan implements the database/sql Scanner interface.
@@ -35,6 +35,6 @@ func (dst *GenericBinary) Scan(src interface{}) error {
}
// Value implements the database/sql/driver Valuer interface.
func (src GenericBinary) Value() (driver.Value, error) {
return (Bytea)(src).Value()
func (src *GenericBinary) Value() (driver.Value, error) {
return (*Bytea)(src).Value()
}