Repository: caddyserver/caddy (language: go)

Issue:
Custom Caddy build with module relying on `httpcaddyfile` doesn't compile
After upgrading to `v2.7.0` and running CI with Go 1.20.7, I get the following error:

```
Error: ../../../go/pkg/mod/github.com/caddyserver/caddy/v2@v2.7.0/caddyconfig/httpcaddyfile/httptype.go:358:24: string does not match ~[]E
```

Also see: https://github.com/hslatman/caddy-crowdsec-bouncer/actions/runs/5744901364/job/15572008214?pr=18#step:5:167

I see the same behavior on my mac.

The change seems to have been introduced in https://github.com/caddyserver/caddy/commit/5c51c1db2ce450a3fa003834097ad010b3844673.


Discussion / hints:

Fix patch:
diff --git a/caddyconfig/httpcaddyfile/httptype.go b/caddyconfig/httpcaddyfile/httptype.go
index 78a380c7e53..ce2ebde3e23 100644
--- a/caddyconfig/httpcaddyfile/httptype.go
+++ b/caddyconfig/httpcaddyfile/httptype.go
@@ -355,7 +355,7 @@ func (st ServerType) Setup(
 				defaultLog.Exclude = append(defaultLog.Exclude, ncl.log.Include...)
 
 				// avoid duplicates by sorting + compacting
-				slices.Sort[string](defaultLog.Exclude)
+				sort.Strings(defaultLog.Exclude)
 				defaultLog.Exclude = slices.Compact[[]string, string](defaultLog.Exclude)
 			}
 		}


Test patch: