mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
promql/parser: use pos instead of origin. (#7853)
Signed-off-by: johncming <johncming@yahoo.com>
This commit is contained in:
parent
bb5c6b38e2
commit
267dd17fe7
|
@ -72,7 +72,7 @@ func (e *ParseErr) Error() string {
|
|||
positionStr = "invalid position:"
|
||||
} else {
|
||||
|
||||
for i, c := range e.Query[:e.PositionRange.Start] {
|
||||
for i, c := range e.Query[:pos] {
|
||||
if c == '\n' {
|
||||
lastLineBreak = i
|
||||
line++
|
||||
|
|
Loading…
Reference in a new issue