Make deterministic

This commit is contained in:
Daniel Smith
2014-06-16 20:05:22 -07:00
parent c27ad1390d
commit 3b980bd9dc
2 changed files with 4 additions and 1 deletions

View File

@@ -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, ",")
}