Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Ye <[email protected]>
  • Loading branch information
yeya24 committed Dec 28, 2023
1 parent 44af0f3 commit 4b72f2c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/api/query/v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -1609,14 +1609,15 @@ func MinResolutionFromExpr(expr parser.Expr) time.Duration {
switch e := n.(type) {
case *parser.MatrixSelector:
var found bool
OUTER:
for i := len(nodes) - 1; i >= 0; i-- {
node := nodes[i]
if f, ok := node.(*parser.Call); ok {
switch f.Func.Name {
// Functions that require at least 2 samples.
case "rate", "irate", "increase", "idelta", "deriv", "predict_linear":
found = true
break
break OUTER
}
}
}
Expand Down

0 comments on commit 4b72f2c

Please sign in to comment.