fix: resolve all linting and formatting issues
- Fix error return value checks (errcheck) - Fix unused parameters by using underscore prefix - Add missing package comments to all packages - Fix context key type issue in middleware (use typed contextKey) - Replace deprecated trace.NewNoopTracerProvider with noop.NewTracerProvider - Fix embedded field selector in database client - Remove trailing whitespace - Remove revive linter (as requested) to avoid stuttering warnings for public API interfaces All linting and formatting checks now pass.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// Package metrics provides Prometheus metrics collection and instrumentation.
|
||||
package metrics
|
||||
|
||||
import (
|
||||
@@ -12,9 +13,9 @@ import (
|
||||
// Metrics holds all Prometheus metrics.
|
||||
type Metrics struct {
|
||||
httpRequestDuration *prometheus.HistogramVec
|
||||
httpRequestTotal *prometheus.CounterVec
|
||||
httpErrorsTotal *prometheus.CounterVec
|
||||
registry *prometheus.Registry
|
||||
httpRequestTotal *prometheus.CounterVec
|
||||
httpErrorsTotal *prometheus.CounterVec
|
||||
registry *prometheus.Registry
|
||||
}
|
||||
|
||||
// NewMetrics creates a new metrics registry with all metrics.
|
||||
@@ -94,4 +95,3 @@ func (m *Metrics) Handler() http.Handler {
|
||||
func (m *Metrics) Registry() *prometheus.Registry {
|
||||
return m.registry
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user