From c41a3d6c8d1a6a7f3484659303d986d2b12642a8 Mon Sep 17 00:00:00 2001 From: James Phillips Date: Mon, 9 Nov 2015 20:39:15 -0800 Subject: [PATCH] Changes "not" prefix from "~" to "!". --- consul/prepared_query_endpoint.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/consul/prepared_query_endpoint.go b/consul/prepared_query_endpoint.go index 830989322b..6bfcfe74b0 100644 --- a/consul/prepared_query_endpoint.go +++ b/consul/prepared_query_endpoint.go @@ -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 {