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) }