stdlibmux

package
v0.0.0-...-e8bd762 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

type Router struct {
	// contains filtered or unexported fields
}

Router is a wrapper for the http.ServeMux from the standard library.

func (*Router) Add

func (r *Router) Add(method string, pattern string, h http.HandlerFunc)

Add adds this route to the router

func (*Router) Name

func (r *Router) Name() string

Name is the name of this router wrapper.

func (*Router) ParamRegexp

func (r *Router) ParamRegexp() bool

ParamRegexp returns true if this router supports regexp params otherwise params will be passed as :user_id not {user_id:[0-9]+}

func (*Router) ParseHandler

func (r *Router) ParseHandler(w http.ResponseWriter, req *http.Request)

ParseHandler does nothing for std mux - could do something? attempt to get query strings at least?

func (*Router) Serve

func (r *Router) Serve(w http.ResponseWriter, req *http.Request)

Serve calls the ServeHTTP function for the router with this request.

func (*Router) Setup

func (r *Router) Setup() error

Setup sets up the router

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL