-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat(main): Filter list-available to latest #368
base: main
Are you sure you want to change the base?
Conversation
…atest version and a verbose flag Signed-off-by: Akhil Repala <[email protected]>
} | ||
|
||
// Compare semantic version of packages | ||
func compareVersions(v1 string, v2 string) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this one doesn't handle the version correctly. Could you add tests for "10.1.1", "2.0.0" expect true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check if hashicorp/go-version
works here. It's already a dependency and used in the resolver. It makes sense to be consistent in how we evaluate package versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, I will look for hashicorp/go-version dependency and will write an unit test as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have modified the comparing semantic version function using hashicorp/go-version and to test that function with some test cases, I did not find any specific _test.go file. Can I create a file called list_test.go to test the changes with some test cases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a written a function to the list_test.go file and added a test function to test. Is this way correct or can you please tell me where to add specific test function?
Closes #352