Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: CLI Response Formatting #3275

Closed
wants to merge 2 commits into from

Conversation

jackzampolin
Copy link
Member

Three are currently a number of issues about properly formatting CLI responses:

There are two major issues underlying the above reports:

  1. Calls to cliCtx.QueryWithData return bytes, many places in the cli don't respect --indent or -o json because the code isn't there
  2. Calls to utils.CompleteAndBroadcastTxCli don't respect the -o json or --indent flags either, and the human readable text format returned is not really readable by humans.

The first commit here unifies the params calls across the modules. Subsequent commits will generalize the approach for printing developed there to all other query CLI calls. Then the same will be done with the Tx calls. Testing will be added as well.

  • Wrote tests
  • Updated relevant documentation (docs/)
  • Added entries in PENDING.md with issue #
  • rereviewed Files changed in the github PR explorer

For Admin Use:

  • Added appropriate labels to PR (ex. wip, ready-for-review, docs)
  • Reviewers Assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)


// Printable defines which structs can be printed by
// CLI output functions
type Printable interface {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see why we're implementing a new interface. This is what Stringer is for 👍

Copy link
Member Author

@jackzampolin jackzampolin Jan 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duh, I'll make that fix. Will be easier 🤦‍♂️

@jackzampolin jackzampolin mentioned this pull request Jan 15, 2019
4 tasks
@jackzampolin
Copy link
Member Author

Was off to a bad start here. Reopened as #3301

@cwgoes cwgoes deleted the jack/params-query-unification branch January 15, 2019 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants