From 12859c2e5d95b8e5e7c807b16f284f60c16c48db Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Fri, 30 Apr 2021 17:46:37 +0300 Subject: [PATCH] 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) --- metrics.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/metrics.go b/metrics.go index e888594..a827738 100644 --- a/metrics.go +++ b/metrics.go @@ -108,9 +108,10 @@ func metricsHandler(reg prometheus.Gatherer, opts promhttp.HandlerOpts) fasthttp case promhttp.HTTPErrorOnError: c.Error(err.Error(), fasthttp.StatusServiceUnavailable) return true + default: + // Do nothing in all other cases, including ContinueOnError. + return false } - // Do nothing in all other cases, including ContinueOnError. - return false } for _, mf := range mfs {