summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/routes.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/caddyhttp/routes.go')
-rw-r--r--modules/caddyhttp/routes.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/caddyhttp/routes.go b/modules/caddyhttp/routes.go
index b8771db..45cbd80 100644
--- a/modules/caddyhttp/routes.go
+++ b/modules/caddyhttp/routes.go
@@ -151,7 +151,7 @@ func (routes RouteList) ProvisionHandlers(ctx caddy.Context) error {
if err != nil {
return fmt.Errorf("route %d: loading handler modules: %v", i, err)
}
- for _, handler := range handlersIface.([]interface{}) {
+ for _, handler := range handlersIface.([]any) {
routes[i].Handlers = append(routes[i].Handlers, handler.(MiddlewareHandler))
}
@@ -315,9 +315,9 @@ func (ms MatcherSets) AnyMatch(req *http.Request) bool {
return len(ms) == 0
}
-// FromInterface fills ms from an interface{} value obtained from LoadModule.
-func (ms *MatcherSets) FromInterface(matcherSets interface{}) error {
- for _, matcherSetIfaces := range matcherSets.([]map[string]interface{}) {
+// FromInterface fills ms from an 'any' value obtained from LoadModule.
+func (ms *MatcherSets) FromInterface(matcherSets any) error {
+ for _, matcherSetIfaces := range matcherSets.([]map[string]any) {
var matcherSet MatcherSet
for _, matcher := range matcherSetIfaces {
reqMatcher, ok := matcher.(RequestMatcher)