pkg/selector: set the cap for slice in SelectorFromSet

This commit is contained in:
Claire Li 2014-07-11 22:59:50 -07:00
parent 89655584eb
commit 2b183943c2

View File

@ -89,7 +89,7 @@ func try(selectorPiece, op string) (lhs, rhs string, ok bool) {
// Given a Set, return a Selector which will match exactly that Set.
func SelectorFromSet(ls Set) Selector {
var items []Selector
items := make([]Selector, 0, len(ls))
for label, value := range ls {
items = append(items, &hasTerm{label: label, value: value})
}