~samwhited/mux

4818c8ea5f2f6a63ac10211236dfc54357892cf4 — Sam Whited 1 year, 1 month ago 38d297f
mux: update Handler docs for the newer behavior
1 files changed, 4 insertions(+), 4 deletions(-)

M mux.go
M mux.go => mux.go +4 -4
@@ 101,14 101,14 @@ func (mux *ServeMux) ServeHTTP(w http.ResponseWriter, r *http.Request) {

// Handler returns the handler to use for the given request, consulting
// r.URL.Path.
// It always returns a non-nil handler.
// It always returns a non-nil handler and request.
//
// The path used is unchanged for CONNECT requests.
//
// If there is no registered handler that applies to the request, Handler
// returns a ``page not found'' handler and an empty pattern.
// The new request uses a context that contains any route parameters that were
// matched against the request path.
// returns a page not found handler.
// If a new request is returned it uses a context that contains any route
// parameters that were matched against the request path.
func (mux *ServeMux) Handler(r *http.Request) (http.Handler, *http.Request) {
	return mux.handler(r)
}