store: make ListQueue return value more predictable by sorting it
The return value hasn't been predictable prior to this commit. This is probably caused by internal implementation of Golang map. This commit fixes it by sorting the output.
This commit is contained in:
parent
7fbe8453ef
commit
268befa435
1 changed files with 5 additions and 0 deletions
|
|
@ -305,6 +305,11 @@ func (s *Store) ListQueue(uuids []uuid.UUID) []*ComposeEntry {
|
|||
}
|
||||
}
|
||||
|
||||
// make this function output more predictable
|
||||
sort.Slice(composes, func(i, j int) bool {
|
||||
return composes[i].ID.String() < composes[j].ID.String()
|
||||
})
|
||||
|
||||
return composes
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue