From 20b598ee3bce377cc2b932333af4fb36d66b1bcb Mon Sep 17 00:00:00 2001 From: lyx0 <66651385+lyx0@users.noreply.github.com> Date: Wed, 20 Dec 2023 02:08:14 +0100 Subject: [PATCH] use go templates for the web pages --- cmd/nourybot/router.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/nourybot/router.go b/cmd/nourybot/router.go index 5fc653e..5bea9af 100644 --- a/cmd/nourybot/router.go +++ b/cmd/nourybot/router.go @@ -69,7 +69,6 @@ func (app *application) commandsRoute(w http.ResponseWriter, r *http.Request, _ } type homeRouteData struct { - Name string Channels []*data.Channel } @@ -87,7 +86,7 @@ func (app *application) homeRoute(w http.ResponseWriter, r *http.Request, _ http } app.Log.Infow("All channels:", "channel", allChannel) - data := &homeRouteData{name, allChannel} + data := &homeRouteData{allChannel} err = t.Execute(w, data) if err != nil {