Documentation ¶
Overview ¶
Package prettyjson provides JSON pretty print. Below code is Inspired from https://github.com/hokaccha/go-prettyjson
Index ¶
- Constants
- func Format(data []byte) ([]byte, error)
- func Marshal(v interface{}) ([]byte, error)
- type Formatter
- type JsonWriter
- type SeparateTree
- type TableWriter
- type TreeWriter
- type Writer
- func CreateWriter(tree, separateTree, drawable, mdEnabled, json bool, ...) Writer
- func NewJsonWriter(changes terraform_state.ResourceChanges) Writer
- func NewSeparateTree(changes map[string]terraform_state.ResourceChanges, drawable bool) Writer
- func NewTableWriter(changes map[string]terraform_state.ResourceChanges, mdEnabled bool) Writer
- func NewTreeWriter(changes terraform_state.ResourceChanges, drawable bool) Writer
Constants ¶
View Source
const SEPARATOR = "###################"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Formatter ¶
type Formatter struct { AddColor *color.Color RemoveColor *color.Color UpdateColor *color.Color RecreateColor *color.Color StringMaxLength int Indent int Newline string }
func NewFormatter ¶
func NewFormatter() *Formatter
NewFormatter returns a new formatter with following default values.
type JsonWriter ¶
type JsonWriter struct {
// contains filtered or unexported fields
}
type SeparateTree ¶
type SeparateTree struct {
// contains filtered or unexported fields
}
type TableWriter ¶
type TableWriter struct {
// contains filtered or unexported fields
}
type TreeWriter ¶
type TreeWriter struct {
// contains filtered or unexported fields
}
type Writer ¶
func CreateWriter ¶
func CreateWriter(tree, separateTree, drawable, mdEnabled, json bool, terraformState terraform_state.TerraformState) Writer
func NewJsonWriter ¶
func NewJsonWriter(changes terraform_state.ResourceChanges) Writer
func NewSeparateTree ¶
func NewSeparateTree(changes map[string]terraform_state.ResourceChanges, drawable bool) Writer
func NewTableWriter ¶
func NewTableWriter(changes map[string]terraform_state.ResourceChanges, mdEnabled bool) Writer
func NewTreeWriter ¶
func NewTreeWriter(changes terraform_state.ResourceChanges, drawable bool) Writer
Click to show internal directories.
Click to hide internal directories.