gorilla/mux
Package gorilla/mux is a powerful HTTP router and URL matcher for building Go web servers with π¦
Build with Backblaze B2
SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.
Loading star history...
Where it stands
Rank, growth pace and release cadence relative to everything GStars tracks.
The project lists 101 contributors on GitHub.
Use Cases & Benefits
- Implements a flexible HTTP request router and URL matcher for building Go web servers.
- Enables complex route matching with variables, regex, subrouters, and middleware for optimized and maintainable request handling.
- Use for building RESTful APIs with dynamic URL parameters and method-based routing in Go applications.
- Use for serving static files and single-page applications alongside API endpoints within a single Go server.
- Use for creating modular web services with middleware support for authentication, logging, and CORS handling.
Should you depend on it?
License terms, project hygiene and risks, from GitHub metadata and GStars' snapshots.
License
BSD 3-Clause
Permissive: commercial use, modification and redistribution are allowed with attribution.
Community files
- README: present
- Contributing guide: present
- Code of conduct: present
Watch-outs
- Warning: No commits in over a year (last push Aug 2024).
General guidance from repository metadata, not legal advice. How we score
From the README
Package
gorilla/muximplements a request router and dispatcher for matching incoming requests to their respective handler.Let's start registering a couple of URL paths and handlers:
Here we register three routes mapping URL paths to handlers. This is equivalent to how
http.HandleFunc()works: if an incoming request URL matches one of the paths, the corresponding handler is called passing (http.ResponseWriter,*http.Request) as parameters.Paths can have variables. They are defined using the format
{name}or{name:pattern}. If a regular expression pattern is not defined, the matched variable will be anything until the next slash. For example:The names are used to create a map of route variables which can be retrieved calling
mux.Vars():And this is all you need to know about the basic usage. More advanced options are explained below.
Daily snapshots
Stars gained per day, and how forks and open issues moved, from GStars' daily snapshots
Forks
1.9K-3
Open issues
48+10
Compared with peers in Networking
Fastest-growing repositories GStars tracks in this cohort for the week of Nov 8, by 7-day star growth
| Repository | Stars | +7d | Health | Last release |
|---|---|---|---|---|
| MHSanaei/3x-ui | 49.6K | +448 | 52 | 137 days ago |
| GyulyVGC/sniffnet | 42.3K | +422 | 75 | 111 days ago |
| tailscale/tailscale | 38.9K | +311 | 75 | today |
| netbirdio/netbird | 30.9K | +267 | 75 | today |
| fosrl/pangolin | 23.6K | +218 | 75 | 6 days ago |
| gorilla/mux | 21.8K | β | 45 | β |
| Category median | 38.9K | +311 | 75 | β |
Also by gorilla
Other repositories from this maintainer that GStars tracks
Discover Repositories
Search across tracked repositories by name or description