Simplifies c.File()

This commit is contained in:
Manu Mtz-Almeida
2015-05-21 15:49:10 +02:00
parent caa75c6201
commit 66251d1741
3 changed files with 1 additions and 18 deletions

View File

@ -375,10 +375,7 @@ func (c *Context) Data(code int, contentType string, data []byte) {
// Writes the specified file into the body stream
func (c *Context) File(filepath string) {
c.Render(-1, render.File{
Path: filepath,
Request: c.Request,
})
http.ServeFile(c.Writer, c.Request, filepath)
}
func (c *Context) SSEvent(name string, message interface{}) {