From 4b99d500c972a15a42ad7f450608e31dfd3feb60 Mon Sep 17 00:00:00 2001 From: Philipp Defner Date: Thu, 11 Jul 2024 22:46:37 +0200 Subject: [PATCH] Fix issues raised by linter --- api/http.go | 1 - pmt.go | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/api/http.go b/api/http.go index e9d2e93..0f144d0 100644 --- a/api/http.go +++ b/api/http.go @@ -81,6 +81,5 @@ func getLFMTaste(s service) http.HandlerFunc { return } render.JSON(w, r, al) - return } } diff --git a/pmt.go b/pmt.go index 2b089af..18c0299 100644 --- a/pmt.go +++ b/pmt.go @@ -8,7 +8,6 @@ import ( "strings" "time" - "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/caarlos0/env" @@ -69,7 +68,7 @@ func main() { r := chi.NewRouter() r.Handle("/*", http.FileServer(http.Dir(assetPath))) r.Handle("/metrics", promhttp.Handler()) - r.Mount("/api", prometheus.InstrumentHandler("api", api.NewHandler(*as))) + r.Mount("/api", api.NewHandler(*as)) l.Log("msg", fmt.Sprintf("paste-my-taste listening on http://localhost:%d", cfg.Port)) err = http.ListenAndServe(fmt.Sprintf(":%d", cfg.Port), r)