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

Adding an optional context.Context parameter to App.RunCommand([]string) #66

Open
ovidiuf opened this issue Nov 22, 2024 · 2 comments
Open

Comments

@ovidiuf
Copy link

ovidiuf commented Nov 22, 2024

Adding an optional (to avoid breaking backward compatibility) context.Context parameter to App.RunCommand([]string) would enhance the testability of commands.

If you are open to the idea, I could write down a short proposal and/or send a PR.

@ovidiuf
Copy link
Author

ovidiuf commented Nov 22, 2024

... or add a new RunCommandWithContext(...)

@skaldesh
Copy link
Member

Sure, a PR is always welcome.
I am not certain, but this might be related to #6

If that is the case, it could turn out to be tricky to actually get readline to abort its current read operation.

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

No branches or pull requests

2 participants