Skip to content

Commit

Permalink
fix linting issues
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Ye <yb532204897@gmail.com>
  • Loading branch information
yeya24 committed Oct 6, 2020
1 parent f8b536f commit 2557f99
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pkg/queryfrontend/metadata_codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func (c metadataCodec) DecodeResponse(ctx context.Context, r *http.Response, req

buf, err := ioutil.ReadAll(r.Body)
if err != nil {
log.Error(err)
log.Error(err) //nolint:errcheck
return nil, httpgrpc.Errorf(http.StatusInternalServerError, "error decoding response: %v", err)
}

Expand Down
9 changes: 3 additions & 6 deletions pkg/queryfrontend/roundtrip.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,8 @@ func NewTripperware(
return nil, err
}

metadataTripperware, err := newMetadataTripperware(config, limits, metadataCodec,
metadataTripperware := newMetadataTripperware(config, limits, metadataCodec,
prometheus.WrapRegistererWith(prometheus.Labels{"tripperware": "metadata"}, reg), logger)
if err != nil {
return nil, err
}

return func(next http.RoundTripper) http.RoundTripper {
return newRoundTripper(next, queryRangeTripperware(next), metadataTripperware(next), reg)
Expand Down Expand Up @@ -116,7 +113,7 @@ func getOperation(r *http.Request) string {
return seriesOp
default:
matched, err := regexp.MatchString("/api/v1/label/.+/values$", r.URL.Path)
if err == nil && matched == true {
if err == nil && matched {
return labelValuesOp
}
}
Expand Down Expand Up @@ -199,7 +196,7 @@ func newMetadataTripperware(
codec *metadataCodec,
reg prometheus.Registerer,
logger log.Logger,
) (frontend.Tripperware, error) {
) frontend.Tripperware {
metadataMiddleware := []queryrange.Middleware{queryrange.LimitsMiddleware(limits)}
m := queryrange.NewInstrumentMiddlewareMetrics(reg)

Expand Down

0 comments on commit 2557f99

Please sign in to comment.