mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 05:34: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:"
|
positionStr = "invalid position:"
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
for i, c := range e.Query[:e.PositionRange.Start] {
|
for i, c := range e.Query[:pos] {
|
||||||
if c == '\n' {
|
if c == '\n' {
|
||||||
lastLineBreak = i
|
lastLineBreak = i
|
||||||
line++
|
line++
|
||||||
|
|
Loading…
Reference in a new issue