static/err_404.go
2025-01-12 04:01:29 -07:00

13 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."))
}