mirror of
https://github.com/nais/wonderwall.git
synced 2026-08-19 11:06:17 +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:
@@ -16,12 +16,6 @@ type fibonacci struct {
|
||||
|
||||
type Option func(*fibonacci)
|
||||
|
||||
func WithBase(d time.Duration) Option {
|
||||
return func(f *fibonacci) {
|
||||
f.base = d
|
||||
}
|
||||
}
|
||||
|
||||
func WithMax(d time.Duration) Option {
|
||||
return func(f *fibonacci) {
|
||||
f.max = d
|
||||
|
||||
@@ -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