Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module app;
- import jaster.cli;
- int main(string[] args)
- {
- auto executor = new CommandLineInterface!(app);
- const statusCode = executor.parseAndExecute(args);
- UserIO.logInfof("Program exited with status code %s", statusCode);
- return statusCode;
- }
- @Command(null, "The default command.")
- struct DefaultCommand
- {
- @CommandPositionalArg(0, "number", "The number to check.")
- int number;
- int onExecute()
- {
- return number % 2 == 0 ? 1 : 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement