Skip to content
This repository has been archived by the owner. It is now read-only.
Go HTTP router.
Branch: master
Clone or download
daryl Merge pull request #4 from kirillweb/master
Fix typo in
Latest commit 49dfdf6 Sep 24, 2016
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Initial Nov 16, 2014
LICENSE URL query fixes + Trailing slash redirects + License. Nov 16, 2014 Fix typo in Sep 23, 2016
mux.go Slight refactor Jan 25, 2015


Zeus is a super-duper, simple and fast HTTP router for Go, nothing more, nothing less.


go get


package main

import (

func main() {
    mux := zeus.New()
    // Supports named parameters.
    mux.GET("/users/:id", showUser)
    // Supports wildcards anywhere.
    mux.GET("/foo/*", catchFoo)
    // Custom 404 handler.
    mux.NotFound = notFound
    // Listen and serve.

func showUser(w http.ResponseWriter, r *http.Request) {
    var id string

    // Get a map of all
    // route variables.
    vm := zeus.Vars(r)

    id = vm["id"]

    // Or just one.
    id = zeus.Var(r, "id")

    fmt.Fprintf(w, "User ID: %s", id)

func catchFoo(w http.ResponseWriter, r *http.Request) {
    w.Write([]byte("Gotta catch 'em all"))

func notFound(w http.ResponseWriter, r *http.Request) {
    w.Write([]byte("Nothing to see here"))


For further documentation, check out GoDoc.

You can’t perform that action at this time.