Changes "not" prefix from "~" to "!".

pull/1389/head
James Phillips 2015-11-09 20:39:15 -08:00
parent 81bb39751a
commit c41a3d6c8d
1 changed files with 2 additions and 2 deletions

View File

@ -312,13 +312,13 @@ func (p *PreparedQuery) execute(query *structs.PreparedQuery,
}
// tagFilter returns a list of nodes who satisfy the given tags. Nodes must have
// ALL the given tags, and none of the forbidden tags (prefixed with ~).
// ALL the given tags, and none of the forbidden tags (prefixed with !).
func tagFilter(tags []string, nodes structs.CheckServiceNodes) structs.CheckServiceNodes {
// Build up lists of required and disallowed tags.
must, not := make([]string, 0), make([]string, 0)
for _, tag := range tags {
tag = strings.ToLower(tag)
if strings.HasPrefix(tag, "~") {
if strings.HasPrefix(tag, "!") {
tag = tag[1:]
not = append(not, tag)
} else {