-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Refactor lib/consts/consts.go #4537
base: master
Are you sure you want to change the base?
Conversation
df82813
to
7e172af
Compare
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.
👍
@@ -0,0 +1,6 @@ | |||
// Package version handles k6 versioning | |||
package version |
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'm curious if we really need the package for that? 🤔
How about moving this to the root (main package) and just access it as go.k6.io/k6.Version
?
// | ||
// Deprecated: alias to support the legacy versioning API. Use the new version package, | ||
// it will be removed as soon as the external services stop to depend on it. | ||
const Version = version.SemVer |
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.
Do you think that migration to the new const is hard enough? I mean, why not clean the package and just announce the breaking change?
What?
It creates a dedicated package for version management. It moves the Semantic Versioning constant string to the new pkg, and it aliases the old.
Why?
It reduces the public surface of k6 API.