code: func (c *Subcommand) Done(result interface{}, err error) int {
  	err = c.writeJSONOutput(result, err)
  	if err != nil {
  		c.printError(err)
  		return 1
  	}
  	return 0
  }
docs: // Done is called as the last step of processing a subcommand.
  //
  // It dumps the command result (or an error) to the JSON output file, prints
  // the error message and generates the process exit code.