fix: reverse clone of list, not global

This commit is contained in:
Roman Godmaire 2024-05-19 21:41:39 -04:00
parent bdb116dab5
commit 9bc1206ef5

View file

@ -103,6 +103,8 @@ var stormlight []Book = []Book{
func getBookWithTimestamp(timeRemaining time.Duration) (string, time.Duration) {
timeRemaining = time.Duration(timeRemaining.Hours()/24) * 45 * time.Minute
stormlight := slices.Clone(stormlight)
slices.Reverse(stormlight)
for _, book := range stormlight {