Skip to content

Commit

Permalink
validate ParseRangeString return value in EvaluateThreshold
Browse files Browse the repository at this point in the history
  • Loading branch information
Tommi2Day committed Jan 16, 2024
1 parent 830a7f2 commit 52ada4a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions range.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ func ParseRangeString(input string) *Range {
r := Range{}

digitOrInfinity := regexp.MustCompile(`[\d~]`)
optionalInvertAndRange := regexp.MustCompile(`^\@?((?:[-+]?[\d\.]+)(?:e(?:[-+]?[\d\.]+))?|~)?(:((?:[-+]?[\d\.]+)(?:e(?:[-+]?[\d\.]+))?)?)?$`)
firstHalfOfRange := regexp.MustCompile(`^((?:[-+]?[\d\.]+)(?:e(?:[-+]?[\d\.]+))?)?:`)
endOfRange := regexp.MustCompile(`^(?:[-+]?[\d\.]+)(?:e(?:[-+]?[\d\.]+))?$`)
optionalInvertAndRange := regexp.MustCompile(`^@?([-+]?[\d.]+(?:e[-+]?[\d.]+)?|~)?(:([-+]?[\d.]+(?:e[-+]?[\d.]+)?)?)?$`)
firstHalfOfRange := regexp.MustCompile(`^([-+]?[\d.]+(?:e[-+]?[\d.]+)?)?:`)
endOfRange := regexp.MustCompile(`^[-+]?[\d.]+(?:e[-+]?[\d.]+)?$`)

r.Start = 0
r.StartInfinity = false
Expand Down

0 comments on commit 52ada4a

Please sign in to comment.