package middlewares import ( "log" "net/http" "github.com/a-h/templ" ) func NotFound(next http.Handler, component templ.Component) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { res := newStatusResponseWriter(w) log.Println("before NotFound: ", res.status) next.ServeHTTP(res, r) log.Println("after NotFound: ", res.status) if res.status == 0 { } }) }