PromQL: avoid new 'go vet' check

Error was 'non-constant format string in call'.

See https://tip.golang.org/doc/go1.24#vet

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
This commit is contained in:
Bryan Boreham 2024-12-20 16:31:41 +00:00
parent 41fb12a4d4
commit 3e1ff078b3
2 changed files with 2 additions and 2 deletions

View file

@ -487,7 +487,7 @@ matrix_selector : expr LEFT_BRACKET number_duration_literal RIGHT_BRACKET
if errMsg != ""{
errRange := mergeRanges(&$2, &$4)
yylex.(*parser).addParseErrf(errRange, errMsg)
yylex.(*parser).addParseErrf(errRange, "%s", errMsg)
}
numLit, _ := $3.(*NumberLiteral)

View file

@ -1384,7 +1384,7 @@ yydefault:
if errMsg != "" {
errRange := mergeRanges(&yyDollar[2].item, &yyDollar[4].item)
yylex.(*parser).addParseErrf(errRange, errMsg)
yylex.(*parser).addParseErrf(errRange, "%s", errMsg)
}
numLit, _ := yyDollar[3].node.(*NumberLiteral)