-
Notifications
You must be signed in to change notification settings - Fork 263
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
Making a toReference public to enable reuse from kn-plugins #1203
Making a toReference public to enable reuse from kn-plugins #1203
Conversation
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.
@cardil: 0 warnings.
In response to this:
Description
Moving a toReference to a public package, so that is it possible to invoke it, from kn plugins.
Changes
- Move
toReference
function toknative.dev/client/pkg/util.ToTrackerReference
- Move
parseSelector
function toknative.dev/client/pkg/util.ParseSelector
Reference
Fixes #1202
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
The following is the coverage report on the affected files.
|
/retest |
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 like the idea and we definitely have every more functions to expose for plugins. However, we had discussed to move all these to the lib/*
directory instead of leaving them in the pkg/*
So perhaps it makes sense to create a lib/util
package and move things there? WDYT?
IDT, if I'm on board with such move. It seems to me like an affront to Golang standards.
Internal code should be placed in |
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.
Thanks, looks good to me ! We might move this code again later when we do a larger refactoring of shared code though, but for now this is fine for me.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cardil, rhuss The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Then we did it all wrong until know as we definitely added for-internal-use-only code into this package already. Thanks for the heads up though, we will take the golang recommendations into account when we move around the code into a shared repository. In order to unblock your work, let's merge this PR and fix that later with the bigger move. |
Description
Moving a toReference to a public package, so that is it possible to invoke it, from kn plugins.
Changes
toReference
function toknative.dev/client/pkg/util.ToTrackerReference
parseSelector
function toknative.dev/client/pkg/util.ParseSelector
Reference
Fixes #1202