Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
net/http: parameterized Routes in Handle #22887
I would agree if this was a use case which is not encountered often enough. While I can use 3rd party routers, they do a lot more stuff under the wraps, causing some overhead. I would prefer not to go through that if possible.
Although if you or anyone could provide a router/Mux with comparable runtime performance, I would appreciate that too
A feature that seems fundamental to one may seem useless to another. You can't have a router that is both useful and free of bloat to everyone's standards.
Have you measured performance on third-party routers to be orders of magnitude slower than that of ServeMux? I would be surprised if it were the case, or if it even mattered in most use cases. I also suspect that the introduction of path arguments and maps would incur extra work and a slow-down no matter what.
As said before, I don't know where the line is drawn for ServeMux. I'm simply trying to point out that adding more features can be a slippery slope, and you already have good alternatives elsewhere.