mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-11 22:20:18 +00:00
Make deterministic
This commit is contained in:
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package labels
|
||||
|
||||
import (
|
||||
"sort"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@@ -35,6 +36,8 @@ func (ls Set) String() string {
|
||||
for key, value := range ls {
|
||||
query = append(query, key+"="+value)
|
||||
}
|
||||
// Sort for determinism.
|
||||
sort.StringSlice(query).Sort()
|
||||
return strings.Join(query, ",")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user