From d5e1f7e2982c2fcc888ccac550b34095efbee217 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Fri, 18 May 2018 07:32:31 -0700 Subject: Upgrading server dependency. (#8807) --- vendor/github.com/gorilla/mux/route.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'vendor/github.com/gorilla/mux/route.go') diff --git a/vendor/github.com/gorilla/mux/route.go b/vendor/github.com/gorilla/mux/route.go index 4ce098d4f..a591d7354 100644 --- a/vendor/github.com/gorilla/mux/route.go +++ b/vendor/github.com/gorilla/mux/route.go @@ -43,6 +43,8 @@ type Route struct { buildVarsFunc BuildVarsFunc } +// SkipClean reports whether path cleaning is enabled for this route via +// Router.SkipClean. func (r *Route) SkipClean() bool { return r.skipClean } @@ -622,7 +624,7 @@ func (r *Route) GetPathRegexp() (string, error) { // route queries. // This is useful for building simple REST API documentation and for instrumentation // against third-party services. -// An empty list will be returned if the route does not have queries. +// An error will be returned if the route does not have queries. func (r *Route) GetQueriesRegexp() ([]string, error) { if r.err != nil { return nil, r.err @@ -641,7 +643,7 @@ func (r *Route) GetQueriesRegexp() ([]string, error) { // query matching. // This is useful for building simple REST API documentation and for instrumentation // against third-party services. -// An empty list will be returned if the route does not define queries. +// An error will be returned if the route does not define queries. func (r *Route) GetQueriesTemplates() ([]string, error) { if r.err != nil { return nil, r.err @@ -659,7 +661,7 @@ func (r *Route) GetQueriesTemplates() ([]string, error) { // GetMethods returns the methods the route matches against // This is useful for building simple REST API documentation and for instrumentation // against third-party services. -// An empty list will be returned if route does not have methods. +// An error will be returned if route does not have methods. func (r *Route) GetMethods() ([]string, error) { if r.err != nil { return nil, r.err @@ -669,7 +671,7 @@ func (r *Route) GetMethods() ([]string, error) { return []string(methods), nil } } - return nil, nil + return nil, errors.New("mux: route doesn't have methods") } // GetHostTemplate returns the template used to build the -- cgit v1.2.3-1-g7c22