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
+3 -3
View File
@@ -149,7 +149,7 @@ func (dst *Inet) DecodeBinary(ci *ConnInfo, src []byte) error {
return nil
}
func (src Inet) EncodeText(ci *ConnInfo, w io.Writer) (bool, error) {
func (src *Inet) EncodeText(ci *ConnInfo, w io.Writer) (bool, error) {
switch src.Status {
case Null:
return true, nil
@@ -162,7 +162,7 @@ func (src Inet) EncodeText(ci *ConnInfo, w io.Writer) (bool, error) {
}
// EncodeBinary encodes src into w.
func (src Inet) EncodeBinary(ci *ConnInfo, w io.Writer) (bool, error) {
func (src *Inet) EncodeBinary(ci *ConnInfo, w io.Writer) (bool, error) {
switch src.Status {
case Null:
return true, nil
@@ -220,6 +220,6 @@ func (dst *Inet) Scan(src interface{}) error {
}
// Value implements the database/sql/driver Valuer interface.
func (src Inet) Value() (driver.Value, error) {
func (src *Inet) Value() (driver.Value, error) {
return encodeValueText(src)
}