Update golangci-lint

This commit is contained in:
9seconds
2022-08-08 15:54:38 +03:00
parent 6a19ded78e
commit 36dad5a2f6
70 changed files with 227 additions and 214 deletions
+3 -3
View File
@@ -171,18 +171,18 @@ func (p *PrometheusFactory) Make() events.Observer {
// Serve starts an HTTP server on a given listener.
func (p *PrometheusFactory) Serve(listener net.Listener) error {
return p.httpServer.Serve(listener) // nolint: wrapcheck
return p.httpServer.Serve(listener) //nolint: wrapcheck
}
// Close stops a factory. Please pay attention that underlying listener
// is not closed.
func (p *PrometheusFactory) Close() error {
return p.httpServer.Shutdown(context.Background()) // nolint: wrapcheck
return p.httpServer.Shutdown(context.Background()) //nolint: wrapcheck
}
// NewPrometheus builds an events.ObserverFactory which can serve HTTP
// endpoint with Prometheus scrape data.
func NewPrometheus(metricPrefix, httpPath string) *PrometheusFactory { // nolint: funlen
func NewPrometheus(metricPrefix, httpPath string) *PrometheusFactory { //nolint: funlen
registry := prometheus.NewPedanticRegistry()
httpHandler := promhttp.HandlerFor(registry, promhttp.HandlerOpts{
EnableOpenMetrics: true,