Documentation ¶
Index ¶
- Variables
- func Params(r *http.Request, param string) string
- type Handler
- type Mux
- func (m *Mux) Delete(path string, fn Handler)
- func (m *Mux) Get(path string, fn Handler)
- func (m *Mux) Head(path string, fn Handler)
- func (m *Mux) Instance() *way.Router
- func (m *Mux) Options(path string, fn Handler)
- func (m *Mux) Patch(path string, fn Handler)
- func (m *Mux) Post(path string, fn Handler)
- func (m *Mux) Put(path string, fn Handler)
- func (m *Mux) ServeHTTP(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
View Source
var ServeHTTP = func(w http.ResponseWriter, r *http.Request, status int, err error) { if status >= 400 { if err != nil { http.Error(w, err.Error(), status) } else { http.Error(w, "", status) } } }
ServeHTTP is a settable function that receives the status and error from the function call.
Functions ¶
Types ¶
type Mux ¶
type Mux struct {
// contains filtered or unexported fields
}
Mux contains the router.
Click to show internal directories.
Click to hide internal directories.