Help us shape the future of Go! Take the 2026 Go Developer Survey

prettyprint

package
v0.10.426 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 4 Imported by: 0

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