We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe2bbaf commit 01cbcaeCopy full SHA for 01cbcae
pkg/apis/deployment/v1alpha/member_status_list.go
@@ -24,6 +24,7 @@ package v1alpha
24
25
import (
26
"math/rand"
27
+ "sort"
28
29
"github.com/pkg/errors"
30
)
@@ -83,7 +84,9 @@ func (l *MemberStatusList) add(m MemberStatus) error {
83
84
return maskAny(errors.Wrapf(AlreadyExistsError, "Member '%s' already exists", m.ID))
85
}
86
- *l = append(src, m)
87
+ newList := append(src, m)
88
+ sort.Slice(newList, func(i, j int) bool { return newList[i].ID < newList[j].ID })
89
+ *l = newList
90
return nil
91
92
0 commit comments