Documentation ¶
Index ¶
- func Var(r *http.Request, n string) string
- func Vars(r *http.Request) map[string]string
- type Handler
- type Mux
- func (m *Mux) DELETE(patt string, handler http.HandlerFunc)
- func (m *Mux) GET(patt string, handler http.HandlerFunc)
- func (m *Mux) HEAD(patt string, handler http.HandlerFunc)
- func (m *Mux) Listen(port string)
- func (m *Mux) OPTIONS(patt string, handler http.HandlerFunc)
- func (m *Mux) PATCH(patt string, handler http.HandlerFunc)
- func (m *Mux) POST(patt string, handler http.HandlerFunc)
- func (m *Mux) PUT(patt string, handler http.HandlerFunc)
- func (m *Mux) ServeHTTP(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handler ¶
type Handler struct { http.HandlerFunc // contains filtered or unexported fields }
Handler contains the pattern and handler func.
type Mux ¶
type Mux struct { NotFound http.HandlerFunc // contains filtered or unexported fields }
Mux contains a map of handlers and the NotFound handler func.
func (*Mux) DELETE ¶
func (m *Mux) DELETE(patt string, handler http.HandlerFunc)
DELETE adds a new route for DELETE requests.
func (*Mux) GET ¶
func (m *Mux) GET(patt string, handler http.HandlerFunc)
GET adds a new route for GET requests.
func (*Mux) HEAD ¶
func (m *Mux) HEAD(patt string, handler http.HandlerFunc)
HEAD adds a new route for HEAD requests.
func (*Mux) OPTIONS ¶
func (m *Mux) OPTIONS(patt string, handler http.HandlerFunc)
OPTIONS adds a new route for OPTIONS requests.
func (*Mux) PATCH ¶
func (m *Mux) PATCH(patt string, handler http.HandlerFunc)
PATCH adds a new route for PATCH requests.
func (*Mux) POST ¶
func (m *Mux) POST(patt string, handler http.HandlerFunc)
POST adds a new route for POST requests.
Click to show internal directories.
Click to hide internal directories.