Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MethodHandler ¶
type MethodHandler map[string]http.HandlerFunc
MethodHandler maps each handler to the corresponding method. Responds with "method not allowed" if none match.
func (MethodHandler) ServeHTTP ¶
func (mh MethodHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP dispatches the request to the handler whose method matches, otherwise it responds with "method not allowed".
type Router ¶
func (*Router) HandleFunc ¶
func (mux *Router) HandleFunc(pattern string, handler http.HandlerFunc)
Handle registers a handler function for the given pattern.
Click to show internal directories.
Click to hide internal directories.