From 55a1311f6a08f6fc3a71330baf4bfa319351ef1f Mon Sep 17 00:00:00 2001 From: Krasi Georgiev Date: Fri, 20 Oct 2017 16:59:53 +0300 Subject: [PATCH] fix golint nits (#3291) --- retrieval/target.go | 12 ++++-------- retrieval/targetmanager.go | 1 + 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/retrieval/target.go b/retrieval/target.go index 862911eba..5953a061d 100644 --- a/retrieval/target.go +++ b/retrieval/target.go @@ -219,10 +219,8 @@ func (app *limitAppender) AddFast(lset labels.Labels, ref uint64, t int64, v flo return errSampleLimit } } - if err := app.Appender.AddFast(lset, ref, t, v); err != nil { - return err - } - return nil + err := app.Appender.AddFast(lset, ref, t, v) + return err } type timeLimitAppender struct { @@ -247,10 +245,8 @@ func (app *timeLimitAppender) AddFast(lset labels.Labels, ref uint64, t int64, v if t > app.maxTime { return storage.ErrOutOfBounds } - if err := app.Appender.AddFast(lset, ref, t, v); err != nil { - return err - } - return nil + err := app.Appender.AddFast(lset, ref, t, v) + return err } // populateLabels builds a label set from the given label set and scrape configuration. diff --git a/retrieval/targetmanager.go b/retrieval/targetmanager.go index 97bf1696d..e1b3af404 100644 --- a/retrieval/targetmanager.go +++ b/retrieval/targetmanager.go @@ -50,6 +50,7 @@ type targetSet struct { sp *scrapePool } +// Appendable returns an Appender. type Appendable interface { Appender() (storage.Appender, error) }