all: Even more boring linter fixes (#5501)

This commit is contained in:
Jakob Borg
2019-02-02 11:45:17 +01:00
committed by GitHub
parent df5c1eaf01
commit 0b2cabbc31
28 changed files with 131 additions and 104 deletions

View File

@@ -112,10 +112,10 @@ func TestAdler32Variants(t *testing.T) {
hf2 := rollingAdler32.New()
checkFn := func(data []byte) bool {
hf1.Write(data)
_, _ = hf1.Write(data)
sum1 := hf1.Sum32()
hf2.Write(data)
_, _ = hf2.Write(data)
sum2 := hf2.Sum32()
hf1.Reset()
@@ -127,7 +127,7 @@ func TestAdler32Variants(t *testing.T) {
// protocol block sized data
data := make([]byte, protocol.MinBlockSize)
for i := 0; i < 5; i++ {
rand.Read(data)
_, _ = rand.Read(data)
if !checkFn(data) {
t.Errorf("Hash mismatch on block sized data")
}
@@ -145,13 +145,13 @@ func TestAdler32Variants(t *testing.T) {
windowSize := 128
hf3 := rollingAdler32.New()
hf3.Write(data[:windowSize])
_, _ = hf3.Write(data[:windowSize])
for i := windowSize; i < len(data); i++ {
if i%windowSize == 0 {
// let the reference function catch up
hf2.Reset()
hf2.Write(data[i-windowSize : i])
_, _ = hf2.Write(data[i-windowSize : i])
// verify that they are in sync with the rolling function
sum2 := hf2.Sum32()