Make service tag filter case-insensitive

This commit is contained in:
William Tisäter 2014-07-23 10:33:47 +02:00
parent 9ad8b9ff19
commit 37426f7410

View File

@ -642,7 +642,8 @@ func serviceTagFilter(l []interface{}, tag string) []interface{} {
n := len(l) n := len(l)
for i := 0; i < n; i++ { for i := 0; i < n; i++ {
srv := l[i].(*structs.ServiceNode) srv := l[i].(*structs.ServiceNode)
if !strContains(srv.ServiceTags, tag) { srv.ServiceTags = ToLowerList(srv.ServiceTags)
if !strContains(srv.ServiceTags, strings.ToLower(tag)) {
l[i], l[n-1] = l[n-1], nil l[i], l[n-1] = l[n-1], nil
i-- i--
n-- n--