fix: bug with parsing variables in roles_query

This commit is contained in:
Vikram Rangnekar
2020-06-04 21:55:52 -04:00
parent 82cc712a93
commit bd157290f6
16 changed files with 159 additions and 113 deletions

View File

@ -12,7 +12,7 @@ func Filter(w *bytes.Buffer, b []byte, keys []string) error {
h := maphash.Hash{}
for i := range keys {
h.WriteString(keys[i])
_, _ = h.WriteString(keys[i])
kmap[h.Sum64()] = struct{}{}
h.Reset()
}
@ -134,7 +134,7 @@ func Filter(w *bytes.Buffer, b []byte, keys []string) error {
cb := b[s:(e + 1)]
e = 0
h.Write(k)
_, _ = h.Write(k)
_, ok := kmap[h.Sum64()]
h.Reset()

View File

@ -44,7 +44,7 @@ func Get(b []byte, keys [][]byte) []Field {
h := maphash.Hash{}
for i := range keys {
h.Write(keys[i])
_, _ = h.Write(keys[i])
kmap[h.Sum64()] = struct{}{}
h.Reset()
}
@ -144,7 +144,7 @@ func Get(b []byte, keys [][]byte) []Field {
}
if e != 0 {
h.Write(k)
_, _ = h.Write(k)
_, ok := kmap[h.Sum64()]
h.Reset()