Skip to content
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

Handle non-numeric suffix when detecting OpenShift minor version #230

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

joelsmith
Copy link
Contributor

  • Commits are signed with Developer Certificate of Origin (DCO)

@jkyros
Copy link
Contributor

jkyros commented Jun 11, 2024

if minor, err = strconv.Atoi(string([]rune(versionInfo.Minor)[0:digitsLen])); err != nil {
is a mouthful but I think that's a simple as we can make it 😄

That ginkgo flag error in the Validation test is a little weird, we didn't touch it.

/lgtm

Signed-off-by: Joel Smith <joelsmith@redhat.com>
@joelsmith
Copy link
Contributor Author

if minor, err = strconv.Atoi(string([]rune(versionInfo.Minor)[0:digitsLen])); err != nil {

is a mouthful but I think that's a simple as we can make it 😄

Surely there must be a more idiomatic way to get a rune-wise substring, right? That's the best I could come up with, and now I'm googling it and finding other people saying to do it the same way. One more knock against Go, I guess. https://stackoverflow.com/questions/28718682/how-to-get-a-substring-from-a-string-of-runes-in-golang

@joelsmith joelsmith merged commit e79e7db into kedacore:main Jun 11, 2024
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants