mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
lint
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
This commit is contained in:
parent
7ea8609024
commit
bd4d997bee
|
@ -16,7 +16,6 @@ package tsdb
|
||||||
import (
|
import (
|
||||||
"math"
|
"math"
|
||||||
"sort"
|
"sort"
|
||||||
"unicode/utf8"
|
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
||||||
|
@ -29,20 +28,6 @@ import (
|
||||||
"github.com/prometheus/prometheus/tsdb/tombstones"
|
"github.com/prometheus/prometheus/tsdb/tombstones"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 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 {
|
||||||
index IndexReader
|
index IndexReader
|
||||||
chunks ChunkReader
|
chunks ChunkReader
|
||||||
|
|
Loading…
Reference in a new issue