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

Enable commands to disable themselves #24

Closed
ethernetdan opened this issue Feb 6, 2016 · 0 comments
Closed

Enable commands to disable themselves #24

ethernetdan opened this issue Feb 6, 2016 · 0 comments

Comments

@ethernetdan
Copy link
Member

I came across the use case of having commands be able to be disabled when I wanted to add a debugging tool to spread but had no way to do so without it being exposed to users.

The reflection logic for menu generation should be altered to look for methods returning a cli.Command pointer rather than value. This allows the methods to return nil if they are disabled.

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

1 participant