Skip to content

Conversation

meowgorithm
Copy link
Member

@meowgorithm meowgorithm commented Nov 26, 2024

Mostly just showing help by default.

Copy link
Member

@caarlos0 caarlos0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was more for testing than as an example per se, but lgtm :D

example sub --async --foo=xyz --async arguments
`,
// Args: cobra.ArbitraryArgs,
Run: func(*cobra.Command, []string) {},
Run: func(*cobra.Command, []string) {
_ = cmd.Help()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe here do something like printing "running the program"?

if we were to show help by default, there's a cobra option for it 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fair. I'll adjust!

@meowgorithm
Copy link
Member Author

meowgorithm commented Nov 26, 2024

Fwiw, I find examples very helpful in leaning how things work!

@caarlos0 caarlos0 merged commit 318d357 into main Nov 27, 2024
22 of 24 checks passed
@caarlos0 caarlos0 deleted the edit branch November 27, 2024 12:25
@caarlos0 caarlos0 restored the edit branch November 27, 2024 12:41
@caarlos0 caarlos0 deleted the edit branch November 27, 2024 12:41
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