Skip to content

Conversation

KimNorgaard
Copy link
Contributor

This removes the version package. Having a version.First() does not justify a package by itself, especially seeing that the function is not specific to versions. It has been recreated as xstrings.Coalesce(). No need to deprecate as it is only used in one place.

This removed the version package. Having a version.First does not justify
a package by itself. The function is not specific to versions and has been
recreated as xstrings.Coalesce(). No need to deprecate as it is only used in one
place.
@KimNorgaard KimNorgaard requested a review from a team as a code owner April 19, 2025 16:15
@KimNorgaard KimNorgaard requested a review from Copilot April 22, 2025 09:46
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the obsolete "version" package by replacing its functionality with the newly introduced xstrings.Coalesce function and cleaning up related references.

  • Reimplemented version logic with xstrings.Coalesce in xstrings/funcs.go and added corresponding tests in xstrings/funcs_test.go.
  • Removed all files related to the version package (doc.go, compare.go, compare_test.go).
  • Updated the README.md to remove the version package from the package listing.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
xstrings/funcs_test.go Added tests to validate the behavior of Coalesce().
xstrings/funcs.go Introduced the Coalesce function to replace version.First().
version/doc.go Removed the version package documentation.
version/compare_test.go Removed the tests for the old version package functionality.
version/compare.go Removed the implementation of version.First().
README.md Removed the version package listing from the documentation.

Copy link
Contributor

@ChBLA ChBLA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine to remove for now. I could see a case where we would want our own implementation of different version-formats (e.g semver), but let's wait until it becomes relevant

@KimNorgaard KimNorgaard merged commit 362eea4 into main Apr 22, 2025
1 check passed
@KimNorgaard KimNorgaard deleted the refactor/delete-version branch April 22, 2025 09:52
KimNorgaard added a commit that referenced this pull request Apr 22, 2025
This removed the version package. Having a version.First does not justify
a package by itself. The function is not specific to versions and has been
recreated as xstrings.Coalesce(). No need to deprecate as it is only used in one
place.
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.

2 participants