Merge pull request #699 from fofloinn/master
Converts group and subgroup to lowercase for comparison.
This commit is contained in:
commit
837db2e147
1 changed files with 3 additions and 2 deletions
|
@ -5,6 +5,7 @@ import (
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
@ -455,10 +456,10 @@ func containsAllMembers(group, subgroup []string) bool {
|
||||||
}
|
}
|
||||||
visit := make(map[string]struct{}, lg)
|
visit := make(map[string]struct{}, lg)
|
||||||
for i := 0; i < lg; i++ {
|
for i := 0; i < lg; i++ {
|
||||||
visit[group[i]] = struct{}{}
|
visit[strings.ToLower(group[i])] = struct{}{}
|
||||||
}
|
}
|
||||||
for i := 0; i < lsg; i++ {
|
for i := 0; i < lsg; i++ {
|
||||||
if _, ok := visit[subgroup[i]]; !ok {
|
if _, ok := visit[strings.ToLower(subgroup[i])]; !ok {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue