return history properly sorted
This commit is contained in:
@@ -12,6 +12,12 @@ type JobVersion struct {
|
||||
SubmitTime int
|
||||
}
|
||||
|
||||
type History []JobVersion
|
||||
|
||||
func (h History) Len() int { return len(h) }
|
||||
func (h History) Swap(i, j int) { h[i], h[j] = h[j], h[i] }
|
||||
func (h History) Less(i, j int) bool { return h[i].Version < h[j].Version }
|
||||
|
||||
type Version struct {
|
||||
Version int `json:"Version,string"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user