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

fix: Make flags work properly #1

Merged
merged 2 commits into from
Sep 21, 2024
Merged

fix: Make flags work properly #1

merged 2 commits into from
Sep 21, 2024

Conversation

hrk091
Copy link
Contributor

@hrk091 hrk091 commented Sep 21, 2024

Problem: The verbose flag and debug flag do not work and there are no effects even when they are set.

I've addressed this issue by providing CmdConfig struct by a pointer to each sub-command factory func, then they are properly populated when Cobra sets command-line parameters to these fields.

In addition, I've fixed the issue that no detailed messages are shown when tests fail if the verbose flag is not set.

@hrk091 hrk091 merged commit 80c4033 into main Sep 21, 2024
3 checks passed
@hrk091 hrk091 deleted the fix/enable_flags branch September 21, 2024 04:05
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.

1 participant