rabbah opened a new issue #314: refactor CLI to reduce bloat 
URL: https://github.com/apache/incubator-openwhisk-cli/issues/314
 
 
   The CLI code is quite bloated with a lot of copy/paste, little sharing of 
code for CRUD operations, redundancy between CREATE and UPDATE, and unnecessary 
JSON structs for working with API responses.
   
   Further, the use of global `Flags` across asset handlers can be confusing 
and should be removed. Where possible, we should remove all the global variable 
references that are mutable.
   
   The intent is to refactor the code so that:
   - CRUD operations share common functions more closely
   - Remove the repetitive error messages which are used as format strings, and 
ids
   - Remove all unnecessary structs which are used for working with JSON 
   - Exit on error, because the returned errors just bubble up to `main` which 
exits anyway
   
   This should reduce significantly reduce the lines of code in the CLI - as a 
rough measure of bloat:
   `wc -l commands/*.go` is 7204
   `cat commands/*.go | sort -u | wc -l` is 3318
   
   The CLI should be leaner and easier to work.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to