mirror of
https://github.com/nais/wonderwall.git
synced 2026-08-23 21:16:14 +00:00
refactor: remove unreachable functions
Both were reported by deadcode: retry.WithBase was never used, and PrometheusMiddleware.Initialize is a leftover from the chi-prometheus code this middleware was adapted from.
This commit is contained in:
@@ -62,14 +62,6 @@ func Prometheus(provider string, buckets ...float64) *PrometheusMiddleware {
|
||||
return &m
|
||||
}
|
||||
|
||||
func (m *PrometheusMiddleware) Initialize(path, method string, code int) {
|
||||
m.reqs.WithLabelValues(
|
||||
strconv.Itoa(code),
|
||||
method,
|
||||
path,
|
||||
)
|
||||
}
|
||||
|
||||
func (m *PrometheusMiddleware) Handler(next http.Handler) http.Handler {
|
||||
relevantPaths := map[string]bool{
|
||||
paths.OAuth2 + paths.Login: true,
|
||||
|
||||
Reference in New Issue
Block a user