render

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColorPrinter

type ColorPrinter interface {
	Red(in string) (out string)
	Green(in string) (out string)
	Yellow(in string) (out string)
	Blue(in string) (out string)
	Magenta(in string) (out string)
	Cyan(in string) (out string)
	Gray(in string) (out string)
}

type ReferenceRender

type ReferenceRender interface {
	SourceCode(ref models.CodeReference, highlight bool) []byte
}

type Renderer

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

func NewRenderer

func NewRenderer(
	colorPrinter ColorPrinter,
	referenceRender ReferenceRender,
	outputType models.OutputType,
	outputJSONOneLine bool,
	asciiTemplates map[string]string,
) *Renderer

func (*Renderer) RenderModel

func (r *Renderer) RenderModel(model interface{}, err error) error

Jump to

Keyboard shortcuts

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