dump

package
v0.1.55 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2021 License: Apache-2.0 Imports: 6 Imported by: 5

Documentation

Overview

Package dump contains functions used to dump JSON documents to the output of the tool.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pretty

func Pretty(stream io.Writer, body []byte) error

Pretty dumps the given data to the given stream so that it looks pretty. If the data is a valid JSON document then it will be indented before printing it. If the `jq` tools is available in the path then it will be used for syntax highlighting.

func Simple added in v0.1.15

func Simple(stream io.Writer, body []byte) error

Simple functions exactly the same as Pretty except it uses jq's -c option to condense the output to a single line, intended to be used with other resources that require single line output.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL