metrics: fix linter warning

It's useless, but still we want to be green
  Error: missing cases in switch of type promhttp.HandlerErrorHandling: ContinueOnError (exhaustive)
This commit is contained in:
Roman Khimov 2021-04-30 17:46:37 +03:00 committed by Roman Khimov
parent 3ee5ad52b6
commit 12859c2e5d

View file

@ -108,10 +108,11 @@ func metricsHandler(reg prometheus.Gatherer, opts promhttp.HandlerOpts) fasthttp
case promhttp.HTTPErrorOnError: case promhttp.HTTPErrorOnError:
c.Error(err.Error(), fasthttp.StatusServiceUnavailable) c.Error(err.Error(), fasthttp.StatusServiceUnavailable)
return true return true
} default:
// Do nothing in all other cases, including ContinueOnError. // Do nothing in all other cases, including ContinueOnError.
return false return false
} }
}
for _, mf := range mfs { for _, mf := range mfs {
if handleError(enc.Encode(mf)) { if handleError(enc.Encode(mf)) {