From a1e595edac4dd7ca39e4d9fd6d0cd12da1389a05 Mon Sep 17 00:00:00 2001 From: beorn7 Date: Mon, 8 Nov 2021 15:32:37 +0100 Subject: [PATCH] Fix two trivial lint warnings Not sure why those show up for me locally but not if run by the CI. Signed-off-by: beorn7 --- discovery/xds/kuma.go | 6 +----- tsdb/wal/wal.go | 5 +---- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/discovery/xds/kuma.go b/discovery/xds/kuma.go index 77f9f0561..5ef573720 100644 --- a/discovery/xds/kuma.go +++ b/discovery/xds/kuma.go @@ -103,11 +103,7 @@ func (c *KumaSDConfig) UnmarshalYAML(unmarshal func(interface{}) error) error { return errors.Errorf("kuma SD server must not be empty and have a scheme: %s", c.Server) } - if err := c.HTTPClientConfig.Validate(); err != nil { - return err - } - - return nil + return c.HTTPClientConfig.Validate() } func (c *KumaSDConfig) Name() string { diff --git a/tsdb/wal/wal.go b/tsdb/wal/wal.go index b2d370914..a38dfdab2 100644 --- a/tsdb/wal/wal.go +++ b/tsdb/wal/wal.go @@ -452,10 +452,7 @@ func (w *WAL) Repair(origErr error) error { if err != nil { return err } - if err := w.setSegment(s); err != nil { - return err - } - return nil + return w.setSegment(s) } // SegmentName builds a segment name for the directory.