-
-
Notifications
You must be signed in to change notification settings - Fork 432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Support hexadecimal integers in conditions #563
Conversation
Remove the assumption that JSON contains only decimal integers and instead identify the base from the prefix of the data. `strconv.ParseInt` can identify the base of the integer based on its "prefix": - 0x -> hexadecimal - 0o -> octal - 0b -> binary - decimal otherwise.
Codecov ReportAll modified lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #563 +/- ##
==========================================
+ Coverage 80.30% 80.32% +0.02%
==========================================
Files 56 56
Lines 4489 4494 +5
==========================================
+ Hits 3605 3610 +5
Misses 703 703
Partials 181 181
☔ View full report in Codecov by Sentry. |
Thank you for the contribution! |
Thank you for Gatus and mentoring me in this issue :) |
* 'master' of https://github.com/TwiN/gatus: (97 commits) docs: add instruction to install as binary (TwiN#615) feat(alerting): make authentication optional for email provider (TwiN#608) feat(alerting): Add gotify provider (TwiN#605) chore(deps): bump github.com/coreos/go-oidc/v3 from 3.6.0 to 3.7.0 (TwiN#604) chore(deps): bump github.com/valyala/fasthttp from 1.49.0 to 1.50.0 (TwiN#594) Feat/modify discord title (TwiN#602) ui: Fix issue back button appearing over title when logo is too small feat(alerting): Add AWS SES Alerting Provider (TwiN#579) chore(deps): bump github.com/wcharczuk/go-chart/v2 from 2.1.0 to 2.1.1 (TwiN#591) ci: Increase timeout-minutes for test workflow to 10 minutes ui: Use localStorage instead of sessionStorage for refresh interval + collapsed groups ui(settings): Fix refresh interval padding chore(deps): bump github.com/prometheus/client_golang from 1.16.0 to 1.17.0 (TwiN#586) chore(deps): bump modernc.org/sqlite from 1.24.0 to 1.26.0 (TwiN#585) fix: Support hexadecimal integers in conditions (TwiN#563) chore(deps): Bump github.com/TwiN/whois to v1.1.7 chore(deps): Bump github.com/TwiN/whois to v1.1.7 fix(alerting): Add support for client.insecure in email alerting provider (TwiN#583) chore(deps): bump github.com/gofiber/fiber/v2 from 2.46.0 to 2.49.2 (TwiN#584) docs: Clean up list of sponsors ...
Remove the assumption that JSON contains only decimal integers and instead identify the base from the prefix of the data.
strconv.ParseInt
can identify the base of the integer based on its "prefix":Summary
Checklist
README.md
, if applicable.