Build Status Build Status GoDoc Go Report Card

mux

A lightweight HTTP request router (multiplexer). Documentation is available at GoDoc.

Releases

Master branch is the stable production-ready branch.

Features

  • Static and dynamic patterns supported. Dynamic parameter values are available in the request's context.
  • Compatible with the built-in http.Handler
  • Only standard library dependencies.
  • Go 1.7+ supported.

Benchmarks

bench.sh
              dynamic route (/some/page/:id)

httprouter    27229 Requests/sec  (+13.40 %)
bone          25679 Requests/sec  ( +6.95 %)
mux           25439 Requests/sec  ( +5.95 %)
gorrila/mux   24010 Requests/sec  (     0 %)
              static route (/other/page/path)

httprouter    27780 Requests/sec  (+10.71 %)
bone          27357 Requests/sec  ( +9,03 %)
mux           26792 Requests/sec  ( +6.77 %)
gorrila/mux   25091 Requests/sec  (     0 %)

The test machine was a Dell Latitude D630 laptop with Intel(R) Core2 Duo T7250 2.00 GHz processor.

Example