forked from TrueCloudLab/frostfs-node
[#1381] neofs-cli: Move JSON and verbose printing to a common package
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
c57114def3
commit
71d823f192
7 changed files with 57 additions and 39 deletions
|
@ -412,7 +412,7 @@ func processKeyer(cmd *cobra.Command, args []string) {
|
|||
func prettyPrintJSON(cmd *cobra.Command, data []byte) {
|
||||
buf := new(bytes.Buffer)
|
||||
if err := json.Indent(buf, data, "", " "); err != nil {
|
||||
printVerbose("Can't pretty print json: %w", err)
|
||||
common.PrintVerbose("Can't pretty print json: %w", err)
|
||||
}
|
||||
|
||||
cmd.Println(buf)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue