mirror of https://github.com/hashicorp/consul
Make service tag filter case-insensitive
parent
9ad8b9ff19
commit
37426f7410
|
@ -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--
|
||||
|
|
Loading…
Reference in New Issue