New Render API
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user