CI: Bump golangci-lint to 2.0.2 (#103572)
This commit is contained in:
@@ -63,7 +63,7 @@ func (e *Expr) Execute(refID string, vars Vars, tracer tracing.Tracer) (r Result
|
||||
|
||||
func (e *Expr) executeState(s *State) (r Results, err error) {
|
||||
defer errRecover(&err, s)
|
||||
r, err = s.walk(e.Tree.Root)
|
||||
r, err = s.walk(e.Root)
|
||||
s.addDropNotices(&r)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ func (f *FuncNode) Check(t *Tree) error {
|
||||
// argType = TypeNumberSet
|
||||
// }
|
||||
if funcType == TypeVariantSet {
|
||||
if !(argType == TypeNumberSet || argType == TypeSeriesSet || argType == TypeScalar) {
|
||||
if argType != TypeNumberSet && argType != TypeSeriesSet && argType != TypeScalar {
|
||||
return fmt.Errorf("parse: expected %v or %v for argument %v, got %v", TypeNumberSet, TypeSeriesSet, i, argType)
|
||||
}
|
||||
} else if funcType != argType {
|
||||
|
||||
@@ -36,10 +36,7 @@ func (s Series) Resample(refID string, interval time.Duration, downsampler Reduc
|
||||
for !t.After(to) && idx <= newSeriesLength {
|
||||
vals := make([]*float64, 0)
|
||||
sIdx := bookmark
|
||||
for {
|
||||
if sIdx == s.Len() {
|
||||
break
|
||||
}
|
||||
for sIdx != s.Len() {
|
||||
st, v := s.GetPoint(sIdx)
|
||||
if st.After(t) {
|
||||
break
|
||||
|
||||
@@ -74,8 +74,8 @@ func (s *Service) TransformData(ctx context.Context, now time.Time, req *Request
|
||||
ctx, span := s.tracer.Start(ctx, "SSE.TransformData")
|
||||
defer func() {
|
||||
var respStatus string
|
||||
switch {
|
||||
case err == nil:
|
||||
switch err {
|
||||
case nil:
|
||||
respStatus = "success"
|
||||
default:
|
||||
respStatus = "failure"
|
||||
|
||||
Reference in New Issue
Block a user