github.com/gorilla/mux

Gorilla Mux

Package mux implements a request router and dispatcher.

80

Decision Signals

Health score 80/100, confidence 100/100.

Strong
Maintenance 38
Adoption 100
Security 92
Maturity 100
Developer DX 97
Confidence 100

Install

go get github.com/gorilla/mux

Package Data

updated May 31, 2026
Latest versionv1.8.1
Imported by99.5K packages
Stars21.8K
Forks1.9K
Last activity1 years ago
Latest releasev1.8.1 (2 years ago)
LicenseBSD-3-Clause
Known vuln records0

API Surface

76 symbols
SymbolKindSynopsis
BuildVarsFunc Type type BuildVarsFunc func(map[string]string) map[string]string
MatcherFunc Type type MatcherFunc func(*http.Request, *RouteMatch) bool
MatcherFunc.Match Method func (m MatcherFunc) Match(r *http.Request, match *RouteMatch) bool
MiddlewareFunc Type type MiddlewareFunc func(http.Handler) http.Handler
CORSMethodMiddleware Function func CORSMethodMiddleware(r *Router) MiddlewareFunc
MiddlewareFunc.Middleware Method func (mw MiddlewareFunc) Middleware(handler http.Handler) http.Handler
Route Type type Route struct{}
CurrentRoute Function func CurrentRoute(r *http.Request) *Route
Route.BuildOnly Method func (r *Route) BuildOnly() *Route
Route.BuildVarsFunc Method func (r *Route) BuildVarsFunc(f BuildVarsFunc) *Route
Route.GetError Method func (r *Route) GetError() error
Route.GetHandler Method func (r *Route) GetHandler() http.Handler

Maintained Alternatives

limited recent repository activity

#1 Chi

Package chi is a small, idiomatic and composable router for building HTTP services.

Go HTTP Routers 22.3K stars 17.3K imported-by 90% confidence
92

Similar Packages

Go HTTP Routers

#1 Chi

Package chi is a small, idiomatic and composable router for building HTTP services.

Go HTTP Routers 22.3K stars 17.3K imported-by 90% confidence
92

#2 ngamux

Package ngamux is simple HTTP router for Go that compatible with net/http, the standard library to serve HTTP.

Go HTTP Routers 0 stars 31 imported-by 80% confidence
67

#3 v5

Package ship has implemented a flexible, powerful, high performance and minimalist Go Web HTTP router framework, which is inspired by echo and httprouter.

Go HTTP Routers 0 stars 51 imported-by 75% confidence
62

#4 httprouter

Package httprouter is a trie based high performance HTTP request router.

Go HTTP Routers 0 stars 27.4K imported-by 80% confidence
61

#5 lars

Package lars - Library Access/Retrieval System, is a fast radix-tree based, zero allocation, HTTP router for Go.

Go HTTP Routers 0 stars 66 imported-by 80% confidence
49