mirror of
https://github.com/gojp/goreportcard.git
synced 2026-01-29 06:49:05 +08:00
looks like m[2] is always valid at this point, removing extra len() check
This commit is contained in:
2
main.go
2
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user