From 8a7ef03dad352157af8adec7364cb61758d24ab1 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 28 Apr 2013 13:34:22 -0700 Subject: Use `knownPaths` to return the list of paths in GetRouteList. --- router.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/router.go b/router.go index ce71df5..d5bcfd0 100644 --- a/router.go +++ b/router.go @@ -90,9 +90,11 @@ func (self *Router) disambiguateMatches(path string, matches []*Match) (*Match, } func (self *Router) GetRouteList() []string { - routes := make([]string, len(self.routes)) - for i, r := range self.routes{ - routes[i] = r.Path + routes := make([]string, len(self.knownPaths)) + i := 0 + for path, _ := range self.knownPaths { + routes[i] = path + i = i + 1 } return routes } -- cgit 1.4.1