From 7e7756de9b8d094d816eb30c5aa5bf73fcdc635e Mon Sep 17 00:00:00 2001 From: Calvin McLean Date: Sat, 10 Aug 2024 16:00:09 -0700 Subject: [PATCH] Add ResponseWriter to remaining handlers --- babyapi_test.go | 8 ++++---- examples/event-rsvp/main.go | 12 ++++++------ examples/todo-htmx/main.go | 10 +++++----- helpers.go | 8 ++++---- html/templates.go | 2 +- router.go | 4 ++-- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/babyapi_test.go b/babyapi_test.go index 1f0487b..231d292 100644 --- a/babyapi_test.go +++ b/babyapi_test.go @@ -51,7 +51,7 @@ func TestBabyAPI(t *testing.T) { w.WriteHeader(http.StatusTeapot) })) - api.AddCustomIDRoute(http.MethodGet, "/teapot", api.GetRequestedResourceAndDo(func(r *http.Request, album *Album) (render.Renderer, *babyapi.ErrResponse) { + api.AddCustomIDRoute(http.MethodGet, "/teapot", api.GetRequestedResourceAndDo(func(_ http.ResponseWriter, r *http.Request, album *Album) (render.Renderer, *babyapi.ErrResponse) { render.Status(r, http.StatusTeapot) return album, nil })) @@ -634,7 +634,7 @@ func (ul *UnorderedList) Render(w http.ResponseWriter, r *http.Request) error { return nil } -func (ul *UnorderedList) HTML(r *http.Request) string { +func (ul *UnorderedList) HTML(_ http.ResponseWriter, r *http.Request) string { templates := map[string]string{ "ul": `