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

Make single point of exit #1066

Merged
merged 1 commit into from
Jul 23, 2024
Merged

Make single point of exit #1066

merged 1 commit into from
Jul 23, 2024

Conversation

gandarez
Copy link
Member

This PR removes multiple os.Exit() calls in order to have it once. It makes easier to control how it returns the exit code by wrapping them in exitcode.Err struct. Any successful response should be returned as nil error.

It replaces the Run func in Cobra by RunE to have the response error outside "internal" scope.

@gandarez gandarez self-assigned this Jul 23, 2024
@gandarez gandarez enabled auto-merge July 23, 2024 00:21
@gandarez gandarez merged commit 3bc6eef into develop Jul 23, 2024
19 checks passed
@gandarez gandarez deleted the feature/os-exit branch July 23, 2024 08:11
@alanhamlett alanhamlett mentioned this pull request Jul 23, 2024
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.

None yet

2 participants