From a20723849123ee755ddaa32c6a619c5083b713aa Mon Sep 17 00:00:00 2001 From: Mark Sagi-Kazar Date: Wed, 16 Jun 2021 00:54:18 +0200 Subject: [PATCH] chore: fix lint issues Signed-off-by: Mark Sagi-Kazar --- cmd/dex/serve.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/dex/serve.go b/cmd/dex/serve.go index fd7da833..47030393 100644 --- a/cmd/dex/serve.go +++ b/cmd/dex/serve.go @@ -21,6 +21,7 @@ import ( grpcprometheus "github.com/grpc-ecosystem/go-grpc-prometheus" "github.com/oklog/run" "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/collectors" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/sirupsen/logrus" "github.com/spf13/cobra" @@ -101,12 +102,12 @@ func runServe(options serveOptions) error { logger.Infof("config issuer: %s", c.Issuer) prometheusRegistry := prometheus.NewRegistry() - err = prometheusRegistry.Register(prometheus.NewGoCollector()) + err = prometheusRegistry.Register(collectors.NewGoCollector()) if err != nil { return fmt.Errorf("failed to register Go runtime metrics: %v", err) } - err = prometheusRegistry.Register(prometheus.NewProcessCollector(prometheus.ProcessCollectorOpts{})) + err = prometheusRegistry.Register(collectors.NewProcessCollector(collectors.ProcessCollectorOpts{})) if err != nil { return fmt.Errorf("failed to register process metrics: %v", err) }