@marcel91200 / caddy Mirror · read-only / commits / 1975408d
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 12, 02:00 UTC

chore: Remove unnecessary explicit type parameters

Matthew Holt committed Mar 7, 2025 at 11:17 UTC 1975408d893226dd5781a0aefdc6181426ee9890
2 files changed +3 -3
caddyconfig/httpcaddyfile/httptype.go
+2 -2
@@ -191,7 +191,7 @@ func (st ServerType) Setup(
191 metrics, _ := options["metrics"].(*caddyhttp.Metrics)
192 for _, s := range servers {
193 if s.Metrics != nil {
194 - metrics = cmp.Or[*caddyhttp.Metrics](metrics, &caddyhttp.Metrics{})
194 + metrics = cmp.Or(metrics, &caddyhttp.Metrics{})
195 metrics = &caddyhttp.Metrics{
196 PerHost: metrics.PerHost || s.Metrics.PerHost,
197 }
@@ -350,7 +350,7 @@ func (st ServerType) Setup(
350
351 // avoid duplicates by sorting + compacting
352 sort.Strings(defaultLog.Exclude)
353 - defaultLog.Exclude = slices.Compact[[]string, string](defaultLog.Exclude)
353 + defaultLog.Exclude = slices.Compact(defaultLog.Exclude)
354 }
355 }
356 // we may have not actually added anything, so remove if empty
modules/caddyhttp/app.go
+1 -1
@@ -207,7 +207,7 @@ func (app *App) Provision(ctx caddy.Context) error {
207
208 if srv.Metrics != nil {
209 srv.logger.Warn("per-server 'metrics' is deprecated; use 'metrics' in the root 'http' app instead")
210 - app.Metrics = cmp.Or[*Metrics](app.Metrics, &Metrics{
210 + app.Metrics = cmp.Or(app.Metrics, &Metrics{
211 init: sync.Once{},
212 httpMetrics: &httpMetrics{},
213 })