summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/gorilla/mux/route.go
diff options
context:
space:
mode:
authorMartin Kraft <martinkraft@gmail.com>2018-05-22 12:54:00 -0400
committerMartin Kraft <martinkraft@gmail.com>2018-05-22 12:54:00 -0400
commit4c683aff7627040ff811f065848a820b2cb19d59 (patch)
tree668061e8acfd8827fd02bab18a998b7986944296 /vendor/github.com/gorilla/mux/route.go
parenteb78d273f39202046fa71555a5a19b0ec8a95cb3 (diff)
parent1af1bce6199597bb2d41ddcdc00ef0f28a73c83e (diff)
downloadchat-4c683aff7627040ff811f065848a820b2cb19d59.tar.gz
chat-4c683aff7627040ff811f065848a820b2cb19d59.tar.bz2
chat-4c683aff7627040ff811f065848a820b2cb19d59.zip
Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-2
Diffstat (limited to 'vendor/github.com/gorilla/mux/route.go')
-rw-r--r--vendor/github.com/gorilla/mux/route.go10
1 files changed, 6 insertions, 4 deletions
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