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

@@ -115,12 +115,12 @@ func cpuBenchOnce(duration time.Duration, newFn func() hash.Hash) float64 {
chunkSize := 100 * 1 << 10
h := newFn()
bs := make([]byte, chunkSize)
rand.Reader.Read(bs)
_, _ = rand.Reader.Read(bs)
t0 := time.Now()
b := 0
for time.Since(t0) < duration {
h.Write(bs)
_, _ = h.Write(bs)
b += chunkSize
}
h.Sum(nil)
@@ -146,7 +146,7 @@ func verifyCorrectness() {
input := "Syncthing Magic Testing Value\n"
h := New()
h.Write([]byte(input))
_, _ = h.Write([]byte(input))
sum := hex.EncodeToString(h.Sum(nil))
if sum != correct {
panic("sha256 is broken")