mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-05 04:55:18 +00:00
lint: enable errcheck (#5336)
## Description Enable errcheck linter throughout the codebase Closes: #5059
This commit is contained in:
@@ -30,9 +30,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)))
|
||||
hasher.Write(s.Hash)
|
||||
hasher.Write(s.Metadata)
|
||||
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
|
||||
var key snapshotKey
|
||||
copy(key[:], hasher.Sum(nil))
|
||||
return key
|
||||
|
||||
Reference in New Issue
Block a user