From 0dd0a0e50cf08519ef842f23ad6108552adc31c5 Mon Sep 17 00:00:00 2001 From: Klaus Post Date: Sun, 16 Jul 2017 17:00:58 +0200 Subject: [PATCH] Fix error grammar Fixes #56 --- matrix.go | 2 +- reedsolomon.go | 2 +- streaming.go | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/matrix.go b/matrix.go index e942ead..339913a 100644 --- a/matrix.go +++ b/matrix.go @@ -137,7 +137,7 @@ func (m matrix) Augment(right matrix) (matrix, error) { } // errMatrixSize is returned if matrix dimensions are doesn't match. -var errMatrixSize = errors.New("matrix sizes does not match") +var errMatrixSize = errors.New("matrix sizes do not match") func (m matrix) SameSize(n matrix) error { if len(m) != len(n) { diff --git a/reedsolomon.go b/reedsolomon.go index b65fde4..daa423b 100644 --- a/reedsolomon.go +++ b/reedsolomon.go @@ -391,7 +391,7 @@ var ErrShardNoData = errors.New("no shard data") // ErrShardSize is returned if shard length isn't the same for all // shards. -var ErrShardSize = errors.New("shard sizes does not match") +var ErrShardSize = errors.New("shard sizes do not match") // checkShards will check if shards are the same size // or 0, if allowed. An error is returned if this fails. diff --git a/streaming.go b/streaming.go index 0db01ce..ce2a41d 100644 --- a/streaming.go +++ b/streaming.go @@ -256,7 +256,7 @@ func trimShards(in [][]byte, size int) [][]byte { func readShards(dst [][]byte, in []io.Reader) error { if len(in) != len(dst) { - panic("internal error: in and dst size does not match") + panic("internal error: in and dst size do not match") } size := -1 for i := range in { @@ -291,7 +291,7 @@ func readShards(dst [][]byte, in []io.Reader) error { func writeShards(out []io.Writer, in [][]byte) error { if len(out) != len(in) { - panic("internal error: in and out size does not match") + panic("internal error: in and out size do not match") } for i := range in { if out[i] == nil { @@ -318,7 +318,7 @@ type readResult struct { // cReadShards reads shards concurrently func cReadShards(dst [][]byte, in []io.Reader) error { if len(in) != len(dst) { - panic("internal error: in and dst size does not match") + panic("internal error: in and dst size do not match") } var wg sync.WaitGroup wg.Add(len(in)) @@ -366,7 +366,7 @@ func cReadShards(dst [][]byte, in []io.Reader) error { // cWriteShards writes shards concurrently func cWriteShards(out []io.Writer, in [][]byte) error { if len(out) != len(in) { - panic("internal error: in and out size does not match") + panic("internal error: in and out size do not match") } var errs = make(chan error, len(out)) var wg sync.WaitGroup