mirror of https://github.com/prometheus/prometheus
Remove unused isRegexMetaCharacter()
Signed-off-by: Marco Pracucci <marco@pracucci.com>pull/13461/head
parent
515890ec53
commit
ec9cada56e
|
@ -18,7 +18,6 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"math"
|
"math"
|
||||||
"unicode/utf8"
|
|
||||||
|
|
||||||
"github.com/oklog/ulid"
|
"github.com/oklog/ulid"
|
||||||
"golang.org/x/exp/slices"
|
"golang.org/x/exp/slices"
|
||||||
|
@ -34,20 +33,6 @@ import (
|
||||||
"github.com/prometheus/prometheus/util/annotations"
|
"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 {
|
type blockBaseQuerier struct {
|
||||||
blockID ulid.ULID
|
blockID ulid.ULID
|
||||||
index IndexReader
|
index IndexReader
|
||||||
|
|
Loading…
Reference in New Issue