From 8615f875f82a40a66baf5cbcef3efcd8b5403a60 Mon Sep 17 00:00:00 2001 From: astaxie Date: Tue, 8 Sep 2015 22:07:44 +0800 Subject: [PATCH] make golint happy staticfile.go --- staticfile.go | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/staticfile.go b/staticfile.go index 7c1ed98c..c85f17e0 100644 --- a/staticfile.go +++ b/staticfile.go @@ -40,15 +40,13 @@ func serverStaticRouter(ctx *context.Context) { if utils.FileExists(file) { http.ServeFile(ctx.ResponseWriter, ctx.Request, file) return - } else { - i++ - if i == len(StaticDir) { - http.NotFound(ctx.ResponseWriter, ctx.Request) - return - } else { - continue - } } + i++ + if i == len(StaticDir) { + http.NotFound(ctx.ResponseWriter, ctx.Request) + return + } + continue } if strings.HasPrefix(requestPath, prefix) { if len(requestPath) > len(prefix) && requestPath[len(prefix)] != '/' {