From 8fd3f024a16e78754617d836ba982e4a5f0de104 Mon Sep 17 00:00:00 2001 From: jackspirou Date: Sun, 23 Aug 2015 16:28:11 -0500 Subject: [PATCH] looks like m[2] is always valid at this point, removing extra len() check --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index fcd8168..2ff8d3a 100644 --- a/main.go +++ b/main.go @@ -22,7 +22,7 @@ func makeHandler(name string, fn func(http.ResponseWriter, *http.Request, string } // catch the special period cases that github does not allow for repos - if len(m) > 2 && (m[2] == "." || m[2] == "..") { + if m[2] == "." || m[2] == ".." { http.NotFound(w, r) return }