prettyprint

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Format

type Format string

Format is an output format for pretty printing

const (
	// TemplateFormat produces text/template-based output
	TemplateFormat Format = "template"
	// JSONFormat produces JSON output
	JSONFormat Format = "json"
	// YAMLFormat produces YAML output
	YAMLFormat Format = "yaml"
)

type Writer

type Writer struct {
	Out          io.Writer
	Format       Format
	FormatString string
}

Writer preconfigures the write function

func (*Writer) Write

func (w *Writer) Write(in interface{}) error

Write prints the input in the preconfigred way

Jump to

Keyboard shortcuts

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