faas-cli
faas-cli copied to clipboard
pkg commands: creates a function newXCmd() in charge of creating a new command
In some test cases, we need to reset flags & args of the command in test. In the actual used technique, creating the command in global scope and initializes its flags & args in init(), we cannot re-create the command to test it from state-zero.
If there is a testing technique for this case, please enlighten me :-)
Attempt to address this issue: https://github.com/openfaas/faas-cli/compare/master...itscaro:refactor-cmd
Derek add label: proposal