-
Notifications
You must be signed in to change notification settings - Fork 102
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
Refactors Info and Get Command Interactive Mode #281
Refactors Info and Get Command Interactive Mode #281
Conversation
445ee42
to
4d26465
Compare
/retest |
4d26465
to
4dea4f8
Compare
api/pkg/cli/utils/utils.go
Outdated
package utils | ||
|
||
import ( | ||
"fmt" |
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.
instead of utils
package I guess we can move this to options
package. Also we can rename select_options
package to options
and move this over there. WDYT?
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.
Hub cli commands already have a struct called options I think it will overlap with that 🤔
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.
options
package I am saying
api/pkg/cli/utils/utils.go
Outdated
From string | ||
Kind string | ||
HubClient hub.Client | ||
selectOption so.Options |
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.
The elements in the struct
of so.Options
are somewhat similar to the elements present in this struct so I guess we can merge both select_options.go and this one. WDYT?
Signed-off-by: Puneet Punamiya <[email protected]>
4dea4f8
to
75fa1af
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.
a few comments otherwise looks good 👍
api/pkg/cli/cmd/get/get.go
Outdated
@@ -211,22 +134,30 @@ func examples(kind string) string { | |||
} | |||
|
|||
func (opts *options) GetResourceInfo() (string, error) { | |||
|
|||
Opts := so.Options{ |
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.
should we rename this to askOpts
or something better ?
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.
May be only ask
??
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 said askOpts
just because we are settings the Options
struct
api/pkg/cli/cmd/info/info.go
Outdated
@@ -144,21 +142,29 @@ func (opts *options) run() error { | |||
opts.hubClient = opts.cli.Hub() | |||
var err error | |||
|
|||
Opts := so.Options{ |
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.
same as above
75fa1af
to
a0a1b6d
Compare
- Adds a package by adding interactive mode functions for catalog, resourceName and version in order to reuse and make generic Signed-off-by: Puneet Punamiya <[email protected]>
a0a1b6d
to
47059dc
Compare
/lgtm |
/retest |
/approve |
In response to this:
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. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sm43 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 |
Changes
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.