Skip to content

Commit

Permalink
Remove redundant Time field in Proms struct
Browse files Browse the repository at this point in the history
  • Loading branch information
domharries committed Aug 12, 2024
1 parent a5ce5cb commit 26443c6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
13 changes: 6 additions & 7 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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"),
Expand Down
4 changes: 3 additions & 1 deletion proms.html.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@
data-umami-event-prom-id="{{.Id}}"
data-umami-event-prom-name="{{.Name}}">G</a>
</div>
<h3><a href="{{.Url}}">{{.Time}} - {{.Name}} ({{.Location}})</a></h3>
<h3><a href="{{.Url}}">
{{.Start.Format "15:04"}} - {{.Name}} ({{.Location}})
</a></h3>
<div class="details">
<ul class="programme">
{{range .Programme}}
Expand Down

0 comments on commit 26443c6

Please sign in to comment.