prettyprint

package
v1.1.959 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: MIT Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context added in v0.5.375

type Context struct {
	PrettyPrint     bool
	Indentation     int
	BaseIndentation int
	Delimiter       string
	Logger          *logrus.Logger
}

func NewPrettyPrintContext

func NewPrettyPrintContext(
	isPrettyPrint bool,
	indentation int,
	baseIndentation int,
	delimiter string,
	logger *logrus.Logger,
) Context

type PrettyPrinter

type PrettyPrinter struct {
	// contains filtered or unexported fields
}

func NewPrettyPrinter

func NewPrettyPrinter(ppCtx Context) *PrettyPrinter

func (*PrettyPrinter) PrintPlaceholderJSON added in v0.5.375

func (pp *PrettyPrinter) PrintPlaceholderJSON(body interface{}) (string, error)

func (*PrettyPrinter) PrintTemplatedJSON

func (pp *PrettyPrinter) PrintTemplatedJSON(body interface{}) (string, error)

func (*PrettyPrinter) RenderColumnName

func (pp *PrettyPrinter) RenderColumnName(cn string) string

func (*PrettyPrinter) RenderTemplateVarAndDelimit

func (pp *PrettyPrinter) RenderTemplateVarAndDelimit(tv string) string

func (*PrettyPrinter) RenderTemplateVarNoDelimit

func (pp *PrettyPrinter) RenderTemplateVarNoDelimit(tv string) string

func (*PrettyPrinter) RenderTemplateVarPlaceholderKeyNoDelimit added in v0.5.375

func (pp *PrettyPrinter) RenderTemplateVarPlaceholderKeyNoDelimit(tv string) string

func (*PrettyPrinter) RenderTemplateVarPlaceholderNoDelimit added in v0.5.375

func (pp *PrettyPrinter) RenderTemplateVarPlaceholderNoDelimit(tv string) string

Jump to

Keyboard shortcuts

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