Re:Better HTTP server routing in Go 1.22
by jbamsterdam on Monday October 16, 2023 @11:08AM
(#37900875)
No, it does not. The length of the pattern isn't important anymore, only whether it overlaps with other patterns.
Re:Better HTTP server routing in Go 1.22
by mariusor on Monday October 16, 2023 @01:16PM
(#37903033)
That would be a breaking API change in my opinion. I bet you the length criterion will still apply for path patterns that don't include placeholders, even if not specifically mentioned in the proposal.
[edit] Heh, I guess you'd know better. :D The comparison between the hn username and github username resolved favourably in the end. :P
> Longer patterns take precedence over shorter ones,
https://pkg.go.dev/net/http#ServeMux