Implement OutputFormat for block in Cli and ledger-tool bigtable (#15524)

* Impl DisplayFormat for solana block

* Use DisplayFormat in ledger-tool bigtable block
This commit is contained in:
Tyera Eulberg
2021-02-24 16:14:34 -07:00
committed by GitHub
parent 7cb44b1095
commit d5f235d997
5 changed files with 156 additions and 91 deletions

View File

@@ -843,6 +843,15 @@ fn main() {
.global(true)
.help("Use DIR for ledger location"),
)
.arg(
Arg::with_name("output_format")
.long("output")
.value_name("FORMAT")
.global(true)
.takes_value(true)
.possible_values(&["json", "json-compact"])
.help("Return information in specified output format, currently only available for bigtable subcommands"),
)
.bigtable_subcommand()
.subcommand(
SubCommand::with_name("print")