Currently the commands under cmd/ are using the Run function to fill the cobra.Command{} struct.
This doesn't allow the program to return an error.
What should be done is to move each command to use the RunE function and return a error instead of printing it and then os.Exit.
Currently the commands under
cmd/
are using theRun
function to fill thecobra.Command{}
struct. This doesn't allow the program to return an error. What should be done is to move each command to use theRunE
function and return a error instead of printing it and thenos.Exit
.