linter: fix nolintlint warnings (#6257)

This commit is contained in:
Callum Waters
2021-03-19 10:59:14 +01:00
committed by GitHub
parent dd84867e2b
commit 6f6083dae3
6 changed files with 10 additions and 7 deletions
+3 -3
View File
@@ -33,9 +33,9 @@ type snapshot struct {
func (s *snapshot) Key() snapshotKey {
// Hash.Write() never returns an error.
hasher := sha256.New()
hasher.Write([]byte(fmt.Sprintf("%v:%v:%v", s.Height, s.Format, s.Chunks))) //nolint:errcheck // ignore error
hasher.Write(s.Hash) //nolint:errcheck // ignore error
hasher.Write(s.Metadata) //nolint:errcheck // ignore error
hasher.Write([]byte(fmt.Sprintf("%v:%v:%v", s.Height, s.Format, s.Chunks)))
hasher.Write(s.Hash)
hasher.Write(s.Metadata)
var key snapshotKey
copy(key[:], hasher.Sum(nil))
return key