🔨 Refactor 'Responses' type and its methods

This commit is contained in:
aykhans committed 2025-08-17 19:30:26 +04:00
1 parent 7930be490d
commit ffa724fae7
4 files changed
+33 -48

No files matched your search

+2 -3
View File
@@ -1,6 +1,7 @@
package types
import (
"slices"
"sort"
"time"
)
@@ -14,9 +15,7 @@ func (d Durations) Sort(ascending ...bool) {
return d[i] > d[j]
})
} else { // Otherwise, sort in ascending order
sort.Slice(d, func(i, j int) bool {
return d[i] < d[j]
})
slices.Sort(d)
}
}