From 26443c66942bb523aaa77451931054aca628c0c1 Mon Sep 17 00:00:00 2001 From: Dominic Harries Date: Mon, 12 Aug 2024 13:22:35 +0100 Subject: [PATCH] Remove redundant Time field in Proms struct --- main.go | 13 ++++++------- proms.html.tmpl | 4 +++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/main.go b/main.go index e02fb6e..344d112 100644 --- a/main.go +++ b/main.go @@ -29,12 +29,12 @@ type Day struct { } type Prom struct { - Id string - Start, End time.Time - Time, Name, Location, Desc string - Programme []Work - Performers []Performer - Url string + Id string + Start, End time.Time + Name, Location, Desc string + Programme []Work + Performers []Performer + Url string } type Work struct { @@ -122,7 +122,6 @@ func refreshPromsList() []Prom { } prom := Prom{ Start: start, - Time: startTime, Name: name, Location: textBySel(promNode, ".ev-event-calendar__event-location"), Desc: textBySel(promNode, ".ev-event-calendar__event-description"), diff --git a/proms.html.tmpl b/proms.html.tmpl index 9899b86..9f717c3 100644 --- a/proms.html.tmpl +++ b/proms.html.tmpl @@ -34,7 +34,9 @@ data-umami-event-prom-id="{{.Id}}" data-umami-event-prom-name="{{.Name}}">G -

{{.Time}} - {{.Name}} ({{.Location}})

+

+ {{.Start.Format "15:04"}} - {{.Name}} ({{.Location}}) +