From 8417ac8ddc7bbd2193b735b9e7a0d167125e6571 Mon Sep 17 00:00:00 2001 From: Ruidy Date: Fri, 23 Aug 2024 10:11:39 +0200 Subject: [PATCH] fix linter error --- internal/server/handle_bookings.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/internal/server/handle_bookings.go b/internal/server/handle_bookings.go index a4dd5a3..65dd907 100644 --- a/internal/server/handle_bookings.go +++ b/internal/server/handle_bookings.go @@ -25,7 +25,7 @@ func handleBookingListPage(bs *booking.Service, hc *config.Host) echo.HandlerFun return func(c echo.Context) error { search := c.FormValue("search") - bookings := make([]*booking.Line, 0) + var bookings []*booking.Line if search != "" { bookings = bs.Search(search) } else { @@ -46,11 +46,9 @@ func handleBookingListPage(bs *booking.Service, hc *config.Host) echo.HandlerFun }) if search != "" { - component := view.BookingLines(bvm) - return renderTempl(c, http.StatusOK, component) + return renderTempl(c, http.StatusOK, view.BookingLines(bvm)) } else { - component := view.ListBookings(bvm) - return renderTempl(c, http.StatusOK, component) + return renderTempl(c, http.StatusOK, view.ListBookings(bvm)) } } }