woodpecker/vendor/github.com/gin-gonic/gin/render/file.go

14 lines
199 B
Go
Raw Normal View History

2015-05-22 18:37:40 +00:00
package render
import "net/http"
type File struct {
Path string
Request *http.Request
}
func (r File) Write(w http.ResponseWriter) error {
http.ServeFile(w, r.Request, r.Path)
return nil
}