mirror of
https://github.com/grafana/grafana.git
synced 2024-11-24 18:00:31 -06:00
5c973e58bd
* Nested Folders: Add store tests * Fix parent order * Fix update * skip tests! * Export test helpers for now
11 lines
241 B
Go
11 lines
241 B
Go
package util
|
|
|
|
// Reverse returns a new slice with reversed order
|
|
func Reverse[T comparable](input []T) []T {
|
|
output := make([]T, 0, len(input))
|
|
for i := len(input) - 1; i >= 0; i-- {
|
|
output = append(output, input[i])
|
|
}
|
|
return output
|
|
}
|