Browse Source

DecodingError.Packet wasn't very useful

Burke Libbey 12 years ago
parent
commit
00a4811e0d
2 changed files with 2 additions and 3 deletions
  1. 1 1
      encoder_decoder.go
  2. 1 2
      errors.go

+ 1 - 1
encoder_decoder.go

@@ -49,7 +49,7 @@ func decode(buf []byte, in decoder) error {
 	}
 
 	if helper.off != len(buf) {
-		return DecodingError{Info: "Length was invalid", Packet: buf}
+		return DecodingError{Info: "Length was invalid"}
 	}
 
 	return nil

+ 1 - 2
errors.go

@@ -38,8 +38,7 @@ var InsufficientData = errors.New("kafka: Insufficient data to decode packet, mo
 // DecodingError is returned when there was an error (other than truncated data) decoding the Kafka broker's response.
 // This can be a bad CRC or length field, or any other invalid value.
 type DecodingError struct {
-	Info   string
-	Packet []byte
+	Info string
 }
 
 func (err DecodingError) Error() string {