From 891f714ba52bc9d1ab4d8861106e5c008e9b0044 Mon Sep 17 00:00:00 2001 From: jackspirou Date: Sun, 23 Aug 2015 10:18:37 -0500 Subject: [PATCH] adding period to url regex in the makeHandler method to allow for github usernames, org names, and repo names --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 92addad..654a174 100644 --- a/main.go +++ b/main.go @@ -12,7 +12,7 @@ import ( func makeHandler(name string, fn func(http.ResponseWriter, *http.Request, string, string)) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { - validPath := regexp.MustCompile(fmt.Sprintf(`^/%s/([a-zA-Z0-9\-_]+)/([a-zA-Z0-9\-_]+)$`, name)) + validPath := regexp.MustCompile(fmt.Sprintf(`^/%s/([a-zA-Z0-9\-_.]+)/([a-zA-Z0-9\-_.]+)$`, name)) m := validPath.FindStringSubmatch(r.URL.Path) if m == nil {