lib/storage: small code simplification after 6cee5338b2

This commit is contained in:
Aliaksandr Valialkin 2021-03-18 15:21:13 +02:00
parent 6cee5338b2
commit 726f6ad804

View file

@ -16,7 +16,6 @@ import (
"time"
"unsafe"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/bytesutil"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/cgroup"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/encoding"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/fasttime"
@ -1053,7 +1052,7 @@ func (s *Storage) SearchGraphitePaths(tr TimeRange, query []byte, maxPaths int,
}
func (s *Storage) searchGraphitePaths(tr TimeRange, qHead, qTail []byte, maxPaths int, deadline uint64) ([]string, error) {
n := strings.IndexAny(bytesutil.ToUnsafeString(qTail), "*[{")
n := bytes.IndexAny(qTail, "*[{")
if n < 0 {
// Verify that qHead matches a metric name.
qHead = append(qHead, qTail...)