Skip to content

Refactor filesystem event handler into a separate section #1190

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

philip-peterson
Copy link
Contributor

@philip-peterson philip-peterson commented Jun 12, 2025

Refactors the generatecmd::Run function into two functions, to reduce complexity. In doing so, I noticed that a few instances of error handling operate by defining a new variable err and logging and/or returning it immediately, while another instance assigns the preexisting symbol err which represents the return value. Because this logic was very unclear, I renamed the top-level err to proxyError (since it is only used for the proxy) and removed the named-return value so that any assignment to err must be its own contained definition to make for better readability.

The diff shows that StartProxy was changed (actually moved), but that is just due to the addition of a new function (and removal of part of another) which confuses the Git diff algorithm.

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