Fix a linter issue

golangci-lint reports the following issue:
storage/mvcc/kvstore.go:312:27: (*store).restore - result 0 (error) is always nil (unparam)

It's due to the fact that both Attach() and compactLockfree() within the
function restore() are able to return an error, but we only log them in
the current implementation. Thus, the return value restore() is always
nil, hence the linter warning.

We have agreed to suppress the linter warning for now [1].

Reference:
[1] https://github.com/etcd-io/etcd/pull/18228#issuecomment-2187309957

Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com>
This commit is contained in:
Chun-Hung Tseng
2024-06-25 11:45:53 +02:00
parent bfc4dc6206
commit 5be397a6a8

View File

@@ -309,6 +309,7 @@ func (s *store) Restore(b backend.Backend) error {
return s.restore()
}
//nolint:unparam
func (s *store) restore() error {
s.setupMetricsReporter()