Skip to content
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

cyctl: Refactor command structure to Nest subcommands #282

Closed
siddhantprateek opened this issue May 21, 2024 · 0 comments
Closed

cyctl: Refactor command structure to Nest subcommands #282

siddhantprateek opened this issue May 21, 2024 · 0 comments
Assignees
Labels
cyctl Issues related to the CLI go Pull requests that update Go code

Comments

@siddhantprateek
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Currently cyctl available commands are implemented using switch cases, which I believe is not ideal. I think the subcommands should be nested.

For example, running cyctl -h should display output like this:

$ cyctl -h
Cyclops gives you a UI containing fields you define yourself to manage your K8s workloads.

Usage:
  cyctl [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  delete      Delete custom resources like modules, templates, and templateauthrules
  get         Retrieve custom resources like modules, templates, and templateauthrules
  help        Help about any command
  version     Prints the version of cyctl

Flags:
  -h, --help      help for cyctl
  -v, --version   version for cyctl

Use "cyctl [command] --help" for more information about a command.

Then, running cyctl get -h should list modules, templates, and templateauthrules as available commands instead of passing them as arguments.


Will you be working on this issue ?
Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cyctl Issues related to the CLI go Pull requests that update Go code
Projects
Status: Done
Development

No branches or pull requests

2 participants