atc0005 / go-nagios

Shared Golang package for Nagios plugins
MIT License
8 stars 3 forks source link

validate ParseRangeString return value in EvaluateThreshold #234

Closed Tommi2Day closed 9 months ago

Tommi2Day commented 9 months ago

this PR adds checking of nil returns from ParseRangeString in EvaluateThreshold. it returns UNKNOWN state result and an error message.

second I added 2 tests to check this expected behavior

should fix #233

atc0005 commented 9 months ago

@Tommi2Day thank you for submitting this PR. I should be able to take a look at this in the next few days and get back to you.

The addition of tests is much appreciated!

Tommi2Day commented 9 months ago

added fix for #235

Tommi2Day commented 9 months ago

Replaced by #236 and #237