aboutsummaryrefslogtreecommitdiffstats
path: root/modules/web/router_path.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/web/router_path.go')
-rw-r--r--modules/web/router_path.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/web/router_path.go b/modules/web/router_path.go
index baf1b522af..1531ccd01c 100644
--- a/modules/web/router_path.go
+++ b/modules/web/router_path.go
@@ -99,7 +99,7 @@ func isValidMethod(name string) bool {
func newRouterPathMatcher(methods, pattern string, h ...any) *routerPathMatcher {
middlewares, handlerFunc := wrapMiddlewareAndHandler(nil, h)
p := &routerPathMatcher{methods: make(container.Set[string]), middlewares: middlewares, handlerFunc: handlerFunc}
- for _, method := range strings.Split(methods, ",") {
+ for method := range strings.SplitSeq(methods, ",") {
method = strings.TrimSpace(method)
if !isValidMethod(method) {
panic("invalid HTTP method: " + method)