13 lines
212 B
Go
13 lines
212 B
Go
package models
|
|
|
|
import "sort"
|
|
|
|
type Datapoints []*Datapoint
|
|
|
|
func (d *Datapoints) SortSlice() {
|
|
// Sort by Path before processing
|
|
sort.Slice(*d, func(i, j int) bool {
|
|
return (*d)[i].Path < (*d)[j].Path
|
|
})
|
|
}
|