Skip to content

Conversation

corhere
Copy link
Collaborator

@corhere corhere commented Dec 19, 2023

Future-proof the version package's exported interface by only making the data available through getter functions. This affords us the flexibility to e.g. implement them in terms of "runtime/debug".ReadBuildInfo() in the future (if go issue 50603 is ever resolved).

It appears that the value of Package is intended to be what is nowadays
called the module path, not the path to the version package. This also
fixes the issue of the version file being regenerated incorrectly under
shell redirection as the go list command no longer attempts to parse .go
files under the version package.

    $ ./version.sh > version.go
    version.go:1:1: expected 'package', found 'EOF'

Signed-off-by: Cory Snider <csnider@mirantis.com>
Future-proof the version package's exported interface by only making the
data available through getter functions. This affords us the flexibility
to e.g. implement them in terms of "runtime/debug".ReadBuildInfo() in
the future.

Signed-off-by: Cory Snider <csnider@mirantis.com>
Copy link
Member

@deleteriousEffect deleteriousEffect left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@milosgajdos milosgajdos merged commit c5a8872 into distribution:main Dec 19, 2023
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.

3 participants