fix(multiplexer): EnsureMethod string comparasion not properly checking method

This commit is contained in:
Guz
2025-11-13 14:17:45 -03:00
parent 18fa785154
commit e3813daa80

View File

@@ -107,7 +107,7 @@ func EnsureMethod(methods ...string) PatternRule {
}
return func(s string) {
sp := strings.Split(s, " ")
if len(sp) <= 0 {
if len(sp) < 2 {
panic(fmt.Sprintf("method: pattern %q doesn't has a method", s))
}
if methods != nil {