Browse Source

Merge pull request #12095 from damnever/unnecessary-sort

Remove unnecessary sort
pull/12115/head
Julien Pivotto 2 years ago committed by GitHub
parent
commit
5583c77b3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      model/labels/labels_string.go

1
model/labels/labels_string.go

@ -411,7 +411,6 @@ func FromStrings(ss ...string) Labels {
ls = append(ls, Label{Name: ss[i], Value: ss[i+1]}) ls = append(ls, Label{Name: ss[i], Value: ss[i+1]})
} }
slices.SortFunc(ls, func(a, b Label) bool { return a.Name < b.Name })
return New(ls...) return New(ls...)
} }

Loading…
Cancel
Save