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:
parent
84e23b5b85
commit
3b22643733
@ -88,15 +88,15 @@ if sl != nil && len(sl) != 0 {
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
for _, song := range sl {
|
for i := 0; i < len(sl); i++ {
|
||||||
<tr>
|
<tr>
|
||||||
<td>{ utils.ToClientTimezone(song.StartAt, r).Format("15:04") }</td>
|
<td>{ utils.ToClientTimezone(sl[i].StartAt, r).Format("15:04") }</td>
|
||||||
if song.MaxListeners != 0 {
|
if sl[i].MaxListeners != 0 {
|
||||||
<td>{ strconv.FormatInt(song.Listeners, 10) }/{ strconv.FormatInt(song.MaxListeners, 10) }</td>
|
<td>{ strconv.FormatInt(sl[i].Listeners, 10) }/{ strconv.FormatInt(sl[i].MaxListeners, 10) }</td>
|
||||||
} else {
|
} else {
|
||||||
<td></td>
|
<td></td>
|
||||||
}
|
}
|
||||||
<td>{ song.Artist } - { song.Title }</td>
|
<td>{ sl[i].Artist } - { sl[i].Title }</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
Loading…
Reference in New Issue
Block a user