package web import ( "io" "log/slog" "testing" "github.com/go-playground/form/v4" ) func newTestApplication(t *testing.T) *application { t.Helper() templateCache, err := newTemplateCache() if err != nil { t.Fatal(err) } return &application{ templateCache: templateCache, formDecoder: form.NewDecoder(), logger: slog.New(slog.NewTextHandler(io.Discard, nil)), } }