Make service tag filter case-insensitive

pull/224/head
William Tisäter 2014-07-23 10:33:47 +02:00
parent 9ad8b9ff19
commit 37426f7410
1 changed files with 2 additions and 1 deletions

View File

@ -642,7 +642,8 @@ func serviceTagFilter(l []interface{}, tag string) []interface{} {
n := len(l)
for i := 0; i < n; i++ {
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
i--
n--