aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Cobo <toqueteos@gmail.com>2015-05-20 13:46:57 +0200
committerCarlos Cobo <toqueteos@gmail.com>2015-05-20 13:46:57 +0200
commitc2bbf9fe8009b22d0f390f3c8c3f13937067590f (patch)
tree2beff7231ec6c80e4d07dd78ba8e6be14309f6b0
parentfc9f0643b21cfe571046e27e0c4565f3a1ee96c8 (diff)
downloadgo-git-c2bbf9fe8009b22d0f390f3c8c3f13937067590f.tar.gz
Fix typos.
-rw-r--r--pktline/decoder.go2
-rw-r--r--pktline/decoder_test.go4
-rw-r--r--pktline/encoder.go2
3 files changed, 4 insertions, 4 deletions
diff --git a/pktline/decoder.go b/pktline/decoder.go
index 194a3e6..db3fd72 100644
--- a/pktline/decoder.go
+++ b/pktline/decoder.go
@@ -7,7 +7,7 @@ import (
)
var (
- ErrUnderflow = errors.New("unexepected string length")
+ ErrUnderflow = errors.New("unexpected string length (underflow)")
ErrInvalidHeader = errors.New("invalid header")
ErrInvalidLen = errors.New("invalid length")
)
diff --git a/pktline/decoder_test.go b/pktline/decoder_test.go
index a0f85ce..7899cc8 100644
--- a/pktline/decoder_test.go
+++ b/pktline/decoder_test.go
@@ -25,7 +25,7 @@ func (s *DecoderSuite) TestReadLineBufferUnderflow(c *C) {
j := &Decoder{strings.NewReader("00e7a\n")}
line, err := j.ReadLine()
- c.Assert(err, ErrorMatches, "unexepected string length")
+ c.Assert(err, Equals, ErrUnderflow)
c.Assert(line, Equals, "")
}
@@ -33,7 +33,7 @@ func (s *DecoderSuite) TestReadLineBufferInvalidLen(c *C) {
j := &Decoder{strings.NewReader("0001foo\n")}
line, err := j.ReadLine()
- c.Assert(err, ErrorMatches, "invalid length")
+ c.Assert(err, Equals, ErrInvalidLen)
c.Assert(line, Equals, "")
}
diff --git a/pktline/encoder.go b/pktline/encoder.go
index b439c54..9c00126 100644
--- a/pktline/encoder.go
+++ b/pktline/encoder.go
@@ -7,7 +7,7 @@ import (
)
var (
- ErrOverflow = errors.New("unexepected string length")
+ ErrOverflow = errors.New("unexpected string length (overflow)")
)
type Encoder struct {