1
0

In an index.templ a range for was replaced by good old C-style for loop to prevent copying by value, and to get rid of that warning about mutex copy.

This commit is contained in:
Alexander Andreev 2024-05-10 04:59:18 +04:00
parent 84e23b5b85
commit 3b22643733
Signed by: Arav
GPG Key ID: 25969B23DCB5CA34

View File

@ -88,15 +88,15 @@ if sl != nil && len(sl) != 0 {
</tr>
</thead>
<tbody>
for _, song := range sl {
for i := 0; i < len(sl); i++ {
<tr>
<td>{ utils.ToClientTimezone(song.StartAt, r).Format("15:04") }</td>
if song.MaxListeners != 0 {
<td>{ strconv.FormatInt(song.Listeners, 10) }/{ strconv.FormatInt(song.MaxListeners, 10) }</td>
<td>{ utils.ToClientTimezone(sl[i].StartAt, r).Format("15:04") }</td>
if sl[i].MaxListeners != 0 {
<td>{ strconv.FormatInt(sl[i].Listeners, 10) }/{ strconv.FormatInt(sl[i].MaxListeners, 10) }</td>
} else {
<td></td>
}
<td>{ song.Artist } - { song.Title }</td>
<td>{ sl[i].Artist } - { sl[i].Title }</td>
</tr>
}
</tbody>