Yet another HTTP router. But this one allows any combinations of regular and param segments for a path.
.gitignore | ||
go.mod | ||
httpr_test.go | ||
httpr.go | ||
LICENSE | ||
README.md |
httpr
It is an implementation of yet another HTTP router.
The reason why this router was made is to be able to have pretty paths with parameters and standard endpoints at the same level.
As an example here is a structure used in my another project (dwelling-upload):
GET /
POST /
GET /:hash/:name
POST /delete
DELETE /:hash
GET /assets/*filepath
GET /robots.txt
GET /favicon.svg
Previously I used httprouter and I had to have /f/:hash/:name
route
instead of just /:hash/:name
because of collisions.