2
0

Remove useless receivers

This commit is contained in:
Jack Christensen
2022-01-08 13:37:23 -06:00
parent 6a6878bafd
commit 4aff33603d
6 changed files with 16 additions and 16 deletions
+2 -2
View File
@@ -118,7 +118,7 @@ func (BoolCodec) PlanEncode(ci *ConnInfo, oid uint32, format int16, value interf
type encodePlanBoolCodecBinary struct{}
func (p *encodePlanBoolCodecBinary) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
func (encodePlanBoolCodecBinary) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
v, valid, err := convertToBoolForEncode(value)
if err != nil {
return nil, fmt.Errorf("cannot convert %v to bool: %v", value, err)
@@ -141,7 +141,7 @@ func (p *encodePlanBoolCodecBinary) Encode(value interface{}, buf []byte) (newBu
type encodePlanBoolCodecText struct{}
func (p *encodePlanBoolCodecText) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
func (encodePlanBoolCodecText) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
v, valid, err := convertToBoolForEncode(value)
if err != nil {
return nil, fmt.Errorf("cannot convert %v to bool: %v", value, err)
+2 -2
View File
@@ -88,7 +88,7 @@ func (BoxCodec) PlanEncode(ci *ConnInfo, oid uint32, format int16, value interfa
type encodePlanBoxCodecBinary struct{}
func (p *encodePlanBoxCodecBinary) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
func (encodePlanBoxCodecBinary) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
box, err := value.(BoxValuer).BoxValue()
if err != nil {
return nil, err
@@ -107,7 +107,7 @@ func (p *encodePlanBoxCodecBinary) Encode(value interface{}, buf []byte) (newBuf
type encodePlanBoxCodecText struct{}
func (p *encodePlanBoxCodecText) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
func (encodePlanBoxCodecText) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
box, err := value.(BoxValuer).BoxValue()
if err != nil {
return nil, err
+2 -2
View File
@@ -89,7 +89,7 @@ func (CircleCodec) PlanEncode(ci *ConnInfo, oid uint32, format int16, value inte
type encodePlanCircleCodecBinary struct{}
func (p *encodePlanCircleCodecBinary) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
func (encodePlanCircleCodecBinary) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
circle, err := value.(CircleValuer).CircleValue()
if err != nil {
return nil, err
@@ -107,7 +107,7 @@ func (p *encodePlanCircleCodecBinary) Encode(value interface{}, buf []byte) (new
type encodePlanCircleCodecText struct{}
func (p *encodePlanCircleCodecText) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
func (encodePlanCircleCodecText) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
circle, err := value.(CircleValuer).CircleValue()
if err != nil {
return nil, err
+6 -6
View File
@@ -132,7 +132,7 @@ func (Int2Codec) PlanEncode(ci *ConnInfo, oid uint32, format int16, value interf
type encodePlanInt2CodecBinary struct{}
func (p *encodePlanInt2CodecBinary) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
func (encodePlanInt2CodecBinary) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
n, valid, err := convertToInt64ForEncode(value)
if err != nil {
return nil, fmt.Errorf("cannot convert %v to int2: %v", value, err)
@@ -153,7 +153,7 @@ func (p *encodePlanInt2CodecBinary) Encode(value interface{}, buf []byte) (newBu
type encodePlanInt2CodecText struct{}
func (p *encodePlanInt2CodecText) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
func (encodePlanInt2CodecText) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
n, valid, err := convertToInt64ForEncode(value)
if err != nil {
return nil, fmt.Errorf("cannot convert %v to int2: %v", value, err)
@@ -639,7 +639,7 @@ func (Int4Codec) PlanEncode(ci *ConnInfo, oid uint32, format int16, value interf
type encodePlanInt4CodecBinary struct{}
func (p *encodePlanInt4CodecBinary) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
func (encodePlanInt4CodecBinary) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
n, valid, err := convertToInt64ForEncode(value)
if err != nil {
return nil, fmt.Errorf("cannot convert %v to int4: %v", value, err)
@@ -660,7 +660,7 @@ func (p *encodePlanInt4CodecBinary) Encode(value interface{}, buf []byte) (newBu
type encodePlanInt4CodecText struct{}
func (p *encodePlanInt4CodecText) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
func (encodePlanInt4CodecText) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
n, valid, err := convertToInt64ForEncode(value)
if err != nil {
return nil, fmt.Errorf("cannot convert %v to int4: %v", value, err)
@@ -1157,7 +1157,7 @@ func (Int8Codec) PlanEncode(ci *ConnInfo, oid uint32, format int16, value interf
type encodePlanInt8CodecBinary struct{}
func (p *encodePlanInt8CodecBinary) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
func (encodePlanInt8CodecBinary) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
n, valid, err := convertToInt64ForEncode(value)
if err != nil {
return nil, fmt.Errorf("cannot convert %v to int8: %v", value, err)
@@ -1178,7 +1178,7 @@ func (p *encodePlanInt8CodecBinary) Encode(value interface{}, buf []byte) (newBu
type encodePlanInt8CodecText struct{}
func (p *encodePlanInt8CodecText) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
func (encodePlanInt8CodecText) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
n, valid, err := convertToInt64ForEncode(value)
if err != nil {
return nil, fmt.Errorf("cannot convert %v to int8: %v", value, err)
+2 -2
View File
@@ -133,7 +133,7 @@ func (Int<%= pg_byte_size %>Codec) PlanEncode(ci *ConnInfo, oid uint32, format i
type encodePlanInt<%= pg_byte_size %>CodecBinary struct{}
func (p *encodePlanInt<%= pg_byte_size %>CodecBinary) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
func (encodePlanInt<%= pg_byte_size %>CodecBinary) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
n, valid, err := convertToInt64ForEncode(value)
if err != nil {
return nil, fmt.Errorf("cannot convert %v to int<%= pg_byte_size %>: %v", value, err)
@@ -154,7 +154,7 @@ func (p *encodePlanInt<%= pg_byte_size %>CodecBinary) Encode(value interface{},
type encodePlanInt<%= pg_byte_size %>CodecText struct{}
func (p *encodePlanInt<%= pg_byte_size %>CodecText) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
func (encodePlanInt<%= pg_byte_size %>CodecText) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
n, valid, err := convertToInt64ForEncode(value)
if err != nil {
return nil, fmt.Errorf("cannot convert %v to int<%= pg_byte_size %>: %v", value, err)
+2 -2
View File
@@ -144,7 +144,7 @@ func (PointCodec) PlanEncode(ci *ConnInfo, oid uint32, format int16, value inter
type encodePlanPointCodecBinary struct{}
func (p *encodePlanPointCodecBinary) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
func (encodePlanPointCodecBinary) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
point, err := value.(PointValuer).PointValue()
if err != nil {
return nil, err
@@ -161,7 +161,7 @@ func (p *encodePlanPointCodecBinary) Encode(value interface{}, buf []byte) (newB
type encodePlanPointCodecText struct{}
func (p *encodePlanPointCodecText) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
func (encodePlanPointCodecText) Encode(value interface{}, buf []byte) (newBuf []byte, err error) {
point, err := value.(PointValuer).PointValue()
if err != nil {
return nil, err