14 lines
239 B
Go
14 lines
239 B
Go
|
package static
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"net/http"
|
||
|
)
|
||
|
|
||
|
func Err404(w http.ResponseWriter, r *http.Request) {
|
||
|
w.Header().Set("Content-Type", "text/html")
|
||
|
fmt.Println("404: " + r.URL.Path)
|
||
|
w.WriteHeader(404)
|
||
|
w.Write([]byte("file not found."))
|
||
|
}
|