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

use cobra #14

Merged
merged 1 commit into from
Sep 24, 2023
Merged

use cobra #14

merged 1 commit into from
Sep 24, 2023

Conversation

pjaudiomv
Copy link
Contributor

cobra is cool

@dgershman
Copy link
Contributor

Yeah it is, I think there is even an easier way to use subcommands. Check out how Zarf does it. https://github.com/defenseunicorns/zarf/tree/main/src/cmd

@dgershman
Copy link
Contributor

@pjaudiomv
Copy link
Contributor Author

https://github.com/defenseunicorns/zarf/blob/main/src/cmd/prepare.go#L145-L149

ya I wanna use flags not sub commands
. I did look into that though

@dgershman
Copy link
Contributor

I'm cool with it is the way it is. It might make it easier to expand upon in the future.

For example:

kxd files list
kxd files current
kxd context list
kxd context switch
kxd context current

Then you can alias things like (or whatever you want)

kxd f ls
kxd f c
kxd ctx ls
kxd ctx s
kxd ctx c

... as so on...

@pjaudiomv pjaudiomv merged commit a97d4f0 into main Sep 24, 2023
1 check passed
@pjaudiomv pjaudiomv deleted the pj/cobra branch September 24, 2023 17:35
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.

2 participants