about summary refs log tree commit diff
path: root/route.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--route.go16
1 files changed, 12 insertions, 4 deletions
diff --git a/route.go b/route.go
index 6c41c95..483f4e3 100644
--- a/route.go
+++ b/route.go
@@ -23,10 +23,10 @@ type Route struct {
 }
 
 type Match struct {
-	Path    string
+	path    string
 	Route   Route
 	mapping map[string]string
-	Method  string
+	method  string
 }
 
 var componentIsVariable = regexp.MustCompile("^{[^}]+}$")
@@ -38,6 +38,14 @@ func (self *Match) RouteParams() map[string]string {
 	return self.mapping
 }
 
+func (self *Match) GetPath() string {
+	return self.path
+}
+
+func (self *Match) GetMethod() string {
+	return self.method
+}
+
 // XXX explain this function
 func (self *Route) convertComponentName(name string) string {
 	newName := convertComponent.FindStringSubmatch(name)
@@ -105,9 +113,9 @@ L:
 	}
 
 	return &Match{
-		Path:    strings.Join(components, "/"),
+		path:    strings.Join(components, "/"),
 		Route:   *self,
-		Method:  method,
+		method:  method,
 		mapping: mapping,
 	}
 }