Do not use defer

This commit is contained in:
Shamus Taylor 2019-10-30 17:04:15 -05:00 committed by GitHub
parent f86827dd12
commit 4042c29f5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -201,7 +201,7 @@ func (group *RouterGroup) createStaticHandler(relativePath string, fs http.FileS
c.index = -1 c.index = -1
return return
} }
defer f.Close() f.Close()
fileServer.ServeHTTP(c.Writer, c.Request) fileServer.ServeHTTP(c.Writer, c.Request)
} }