Remove useless receivers
This commit is contained in:
+2
-2
@@ -118,7 +118,7 @@ func (BoolCodec) PlanEncode(ci *ConnInfo, oid uint32, format int16, value interf
|
|||||||
|
|
||||||
type encodePlanBoolCodecBinary struct{}
|
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)
|
v, valid, err := convertToBoolForEncode(value)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("cannot convert %v to bool: %v", value, err)
|
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{}
|
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)
|
v, valid, err := convertToBoolForEncode(value)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("cannot convert %v to bool: %v", value, err)
|
return nil, fmt.Errorf("cannot convert %v to bool: %v", value, err)
|
||||||
|
|||||||
+2
-2
@@ -88,7 +88,7 @@ func (BoxCodec) PlanEncode(ci *ConnInfo, oid uint32, format int16, value interfa
|
|||||||
|
|
||||||
type encodePlanBoxCodecBinary struct{}
|
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()
|
box, err := value.(BoxValuer).BoxValue()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -107,7 +107,7 @@ func (p *encodePlanBoxCodecBinary) Encode(value interface{}, buf []byte) (newBuf
|
|||||||
|
|
||||||
type encodePlanBoxCodecText struct{}
|
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()
|
box, err := value.(BoxValuer).BoxValue()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
+2
-2
@@ -89,7 +89,7 @@ func (CircleCodec) PlanEncode(ci *ConnInfo, oid uint32, format int16, value inte
|
|||||||
|
|
||||||
type encodePlanCircleCodecBinary struct{}
|
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()
|
circle, err := value.(CircleValuer).CircleValue()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -107,7 +107,7 @@ func (p *encodePlanCircleCodecBinary) Encode(value interface{}, buf []byte) (new
|
|||||||
|
|
||||||
type encodePlanCircleCodecText struct{}
|
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()
|
circle, err := value.(CircleValuer).CircleValue()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
+6
-6
@@ -132,7 +132,7 @@ func (Int2Codec) PlanEncode(ci *ConnInfo, oid uint32, format int16, value interf
|
|||||||
|
|
||||||
type encodePlanInt2CodecBinary struct{}
|
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)
|
n, valid, err := convertToInt64ForEncode(value)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("cannot convert %v to int2: %v", value, err)
|
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{}
|
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)
|
n, valid, err := convertToInt64ForEncode(value)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("cannot convert %v to int2: %v", value, err)
|
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{}
|
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)
|
n, valid, err := convertToInt64ForEncode(value)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("cannot convert %v to int4: %v", value, err)
|
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{}
|
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)
|
n, valid, err := convertToInt64ForEncode(value)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("cannot convert %v to int4: %v", value, err)
|
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{}
|
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)
|
n, valid, err := convertToInt64ForEncode(value)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("cannot convert %v to int8: %v", value, err)
|
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{}
|
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)
|
n, valid, err := convertToInt64ForEncode(value)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("cannot convert %v to int8: %v", value, err)
|
return nil, fmt.Errorf("cannot convert %v to int8: %v", value, err)
|
||||||
|
|||||||
+2
-2
@@ -133,7 +133,7 @@ func (Int<%= pg_byte_size %>Codec) PlanEncode(ci *ConnInfo, oid uint32, format i
|
|||||||
|
|
||||||
type encodePlanInt<%= pg_byte_size %>CodecBinary struct{}
|
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)
|
n, valid, err := convertToInt64ForEncode(value)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("cannot convert %v to int<%= pg_byte_size %>: %v", value, err)
|
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{}
|
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)
|
n, valid, err := convertToInt64ForEncode(value)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("cannot convert %v to int<%= pg_byte_size %>: %v", value, err)
|
return nil, fmt.Errorf("cannot convert %v to int<%= pg_byte_size %>: %v", value, err)
|
||||||
|
|||||||
+2
-2
@@ -144,7 +144,7 @@ func (PointCodec) PlanEncode(ci *ConnInfo, oid uint32, format int16, value inter
|
|||||||
|
|
||||||
type encodePlanPointCodecBinary struct{}
|
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()
|
point, err := value.(PointValuer).PointValue()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -161,7 +161,7 @@ func (p *encodePlanPointCodecBinary) Encode(value interface{}, buf []byte) (newB
|
|||||||
|
|
||||||
type encodePlanPointCodecText struct{}
|
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()
|
point, err := value.(PointValuer).PointValue()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
Reference in New Issue
Block a user