mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-11-27 14:40:18 +01:00
cb6e5cb0c7
* use dep for vendoring * lets encrypt * moved web to transfer.sh-web repo * single command install * added first tests
13 lines
297 B
Go
13 lines
297 B
Go
package handlers
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
// StaticFileHandler, unlike net/http.FileServer, serves the contents of a specific
|
|
// file when it is called.
|
|
func StaticFileHandler(path string) http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
http.ServeFile(w, r, path)
|
|
}
|
|
}
|