about summary refs log tree commit diff
path: root/router.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--router.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/router.go b/router.go
index c40713d..4c9dfab 100644
--- a/router.go
+++ b/router.go
@@ -137,3 +137,14 @@ func (self *Router) GetAllRoutesByMethods (method string) []*Route {
 	}
 	return routes
 }
+
+func (self *Router) GetMethodsForPath(path string) []string {
+	p := self.knownPaths[path]
+	m := make([]string, len(p))
+	i := 0
+	for k, _ := range p {
+		m[i] = k
+		i = i + 1
+	}
+	return m
+}