mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 21:01:31 +00:00
make golint happy staticfile.go
This commit is contained in:
parent
b2048e8653
commit
8615f875f8
@ -40,16 +40,14 @@ func serverStaticRouter(ctx *context.Context) {
|
|||||||
if utils.FileExists(file) {
|
if utils.FileExists(file) {
|
||||||
http.ServeFile(ctx.ResponseWriter, ctx.Request, file)
|
http.ServeFile(ctx.ResponseWriter, ctx.Request, file)
|
||||||
return
|
return
|
||||||
} else {
|
}
|
||||||
i++
|
i++
|
||||||
if i == len(StaticDir) {
|
if i == len(StaticDir) {
|
||||||
http.NotFound(ctx.ResponseWriter, ctx.Request)
|
http.NotFound(ctx.ResponseWriter, ctx.Request)
|
||||||
return
|
return
|
||||||
} else {
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
if strings.HasPrefix(requestPath, prefix) {
|
if strings.HasPrefix(requestPath, prefix) {
|
||||||
if len(requestPath) > len(prefix) && requestPath[len(prefix)] != '/' {
|
if len(requestPath) > len(prefix) && requestPath[len(prefix)] != '/' {
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user