Adjust pgAdmin version comparision logic#4385
Conversation
Now that the current version of pgAdmin is greater than 9.9, the version comparison logic has to be updated to properly compare the values (i.e. we can no longer use a simple x < y to compare floats). This update makes the necessary adjustments so our code works as expected for newer versions of pgAdmin. Issue: PGO-2838
dsessler7
left a comment
There was a problem hiding this comment.
I imagine that the idiomatic way to do this in go would be to use the following package:
https://pkg.go.dev/golang.org/x/mod/semver
But I'm fine with what you've done here. LGTM.
🤔 If I understand correctly, I think that package requires the version string to begin with a |
Yeah, I'd just slap a "v" on the front... But again, I think what you've got here is fine. |
Checklist:
Type of Changes:
What is the current behavior (link to any open issues here)?
Now that the current version of pgAdmin is greater than 9.9, the version comparison logic has to be updated to properly compare the values (i.e. we can no longer use a simple x < y to compare floats).
What is the new behavior (if this is a feature change)?
This update makes the necessary adjustments so our code works as expected for newer versions of pgAdmin.
Other Information:
Issue: PGO-2838