Cli flag hierarchy and how to deal with it in code.
I believe the title is self explanatory but I'll elaborate. The best description I can give is using an example ; so let me use the Linux "find" command. For basic searches by name I can simply use – "find . -name "*mp4" ". However, there are numerous other flags I can optionally include. For example the -depth flag.
Programmatically how do you deal with optional flags and especially optional flags with hierarchical dependencies.
I hope I'm being clear enough. Is this a matter of clever switch statement use, combined with if/else blocks. On its face it doesn't seem that simple.
Submitted July 14, 2017 at 02:18AM by ops-man
via reddit http://ift.tt/2sVhJMk