[release-10.4.18] Go: Bump to 1.24.2 (#103531)

* Go: Bump to 1.24.2

* CI: Update golangci-lint

* feat: update swagger

* fix: more lints

* fix: lints
This commit is contained in:
Mariell Hoversholm
2025-04-09 11:12:33 +02:00
committed by GitHub
parent ee117f713e
commit 750b094dda
75 changed files with 846 additions and 368 deletions
+1
View File
@@ -102,6 +102,7 @@ func unmarshalOutlierCommand(expr CommandConfiguration, appURL string) (*Outlier
interval := defaultInterval
if expr.IntervalMs != nil {
//nolint:gosec // G115
i := time.Duration(*expr.IntervalMs) * time.Millisecond
if i > 0 {
interval = i
+8
View File
@@ -129,8 +129,16 @@ func createMathExpression(referenceVar string, thresholdFunc string, args []floa
case ThresholdIsBelow:
exp = fmt.Sprintf("${%s} < %f", referenceVar, args[0])
case ThresholdIsWithinRange:
if len(args) < 2 {
// avoid panic
return "", fmt.Errorf("incorrect number of arguments: got %d but need 2", len(args))
}
exp = fmt.Sprintf("${%s} > %f && ${%s} < %f", referenceVar, args[0], referenceVar, args[1])
case ThresholdIsOutsideRange:
if len(args) < 2 {
// avoid panic
return "", fmt.Errorf("incorrect number of arguments: got %d but need 2", len(args))
}
exp = fmt.Sprintf("${%s} < %f || ${%s} > %f", referenceVar, args[0], referenceVar, args[1])
default:
return "", fmt.Errorf("failed to evaluate threshold expression: no such threshold function %s", thresholdFunc)