Remove unused isRegexMetaCharacter()

Signed-off-by: Marco Pracucci <marco@pracucci.com>
This commit is contained in:
Marco Pracucci 2024-01-26 06:35:02 +01:00
parent 515890ec53
commit ec9cada56e
No known key found for this signature in database
GPG Key ID: 74C1BD403D2DF9B5
1 changed files with 0 additions and 15 deletions

View File

@ -18,7 +18,6 @@ import (
"errors"
"fmt"
"math"
"unicode/utf8"
"github.com/oklog/ulid"
"golang.org/x/exp/slices"
@ -34,20 +33,6 @@ import (
"github.com/prometheus/prometheus/util/annotations"
)
// Bitmap used by func isRegexMetaCharacter to check whether a character needs to be escaped.
var regexMetaCharacterBytes [16]byte
// isRegexMetaCharacter reports whether byte b needs to be escaped.
func isRegexMetaCharacter(b byte) bool {
return b < utf8.RuneSelf && regexMetaCharacterBytes[b%16]&(1<<(b/16)) != 0
}
func init() {
for _, b := range []byte(`.+*?()|[]{}^$`) {
regexMetaCharacterBytes[b%16] |= 1 << (b / 16)
}
}
type blockBaseQuerier struct {
blockID ulid.ULID
index IndexReader