17 lines
340 B
Go
17 lines
340 B
Go
package handlers
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/rs/zerolog/hlog"
|
|
)
|
|
|
|
func (app *Application) NotFound(w http.ResponseWriter, r *http.Request) {
|
|
renderTemplate(*notFoundTemplate, nil, func(w http.ResponseWriter, r *http.Request) {
|
|
l := hlog.FromRequest(r)
|
|
l.Info().Msg("Not found")
|
|
|
|
w.WriteHeader(http.StatusNotFound)
|
|
})(w, r)
|
|
}
|