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
mmctl: Review unarchiveChannelsCmdF function to return an error in case of a failure #21212
Labels
Area/mmctl
Difficulty/1:Easy
Easy ticket
Hacktoberfest
Help Wanted
Community help wanted
PR Exists
Tech/Go
Server
Comments
Hi! I'd like to work on it 🙂 |
I want to work on this |
When does it not return error even if its failing? |
hi, is this isssue still relevant? I would like to work on it |
@lukas-mar Thanks for working on the ticket @lukas-mar 👍 Please let me know if you have any questions. |
@lukas-mar Do you still want to work on the ticket? |
Can I pick this up? |
Sure think @ezekielchow 👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area/mmctl
Difficulty/1:Easy
Easy ticket
Hacktoberfest
Help Wanted
Community help wanted
PR Exists
Tech/Go
Server
In the course of Hacktober 2022, we would like to review the return codes of the
mmctl
subcommands. It turns out that we have some subcommands that return0
(successful return code) even if they fail. This is not a good practice and we should fix it. In this context, we would like to reviewunarchiveChannelsCmdF
function and tailor a way to return a non-zero return code if the function fails. To be able to return a non-zero return code, it should be enough to return the error value from the handler. This effort should also include updating the test files for the command handler. The specific handler can be found in the file: https://github.com/mattermost/mmctl/blob/master/commands/channel.goPS: You don't need to check errors for parsing the flags. The goal of this ticket is to pass error to the root handler so that we can have a non zero return code. If there are multiple errors can occur in a loop, please consider using
multiError.Error
to append the errors and return the error after the loop.If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.
New contributors please see our Developer's Guide.
JIRA: https://mattermost.atlassian.net/browse/MM-47348
The text was updated successfully, but these errors were encountered: