File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
apis/fluentd/v1alpha1/plugins/params Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -263,14 +263,12 @@ func (a PluginStoreByNameById) Less(i, j int) bool {
263263// lessId orders @id strings so that numeric suffixes compare numerically once
264264// both ids share a "<prefix>-<index>" shape. A plain lexicographic compare
265265// would place "<p>-10" before "<p>-2" because '1' < '2'. Falls back to
266- // lexicographic order when either side lacks a numeric trailing segment.
266+ // lexicographic order when either side lacks a numeric trailing segment or
267+ // when the parsed prefixes differ.
267268func lessId (id1 , id2 string ) bool {
268269 p1 , n1 , ok1 := splitIdIndex (id1 )
269270 p2 , n2 , ok2 := splitIdIndex (id2 )
270- if ok1 && ok2 {
271- if p1 != p2 {
272- return p1 < p2
273- }
271+ if ok1 && ok2 && p1 == p2 {
274272 return n1 < n2
275273 }
276274 return id1 < id2
You can’t perform that action at this time.
0 commit comments