Merge pull request #384 from harshavardhana/pr_out_fix_golint_complaints
This commit is contained in:
commit
7503b7f9d1
1 changed files with 3 additions and 2 deletions
|
@ -47,7 +47,8 @@ func (e *Encoder) Decode(encodedDataBlocks [][]byte, dataLen int) (decodedData [
|
||||||
n := k + m
|
n := k + m
|
||||||
// We need the data and parity blocks preserved in the same order. Missing blocks are set to nil.
|
// We need the data and parity blocks preserved in the same order. Missing blocks are set to nil.
|
||||||
if len(encodedDataBlocks) != n {
|
if len(encodedDataBlocks) != n {
|
||||||
return nil, errors.New(fmt.Sprintf("Encoded data blocks slice must of length [%d]", n))
|
msg := fmt.Sprintf("Encoded data blocks slice must of length [%d]", n)
|
||||||
|
return nil, errors.New(msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Length of a single encoded block
|
// Length of a single encoded block
|
||||||
|
@ -55,7 +56,7 @@ func (e *Encoder) Decode(encodedDataBlocks [][]byte, dataLen int) (decodedData [
|
||||||
|
|
||||||
// Keep track of errors per block.
|
// Keep track of errors per block.
|
||||||
missingEncodedBlocks := make([]int, n+1)
|
missingEncodedBlocks := make([]int, n+1)
|
||||||
var missingEncodedBlocksCount int = 0
|
var missingEncodedBlocksCount int
|
||||||
|
|
||||||
// Check for the missing encoded blocks
|
// Check for the missing encoded blocks
|
||||||
for i := range encodedDataBlocks {
|
for i := range encodedDataBlocks {
|
||||||
|
|
Loading…
Reference in a new issue