renderer

package
v1.4.8 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColorRenderer

type ColorRenderer struct {
	Color aurora.Aurora
}

ColorRenderer implements Renderer and prints with color and formatting

func New added in v1.4.7

func New(useColor bool) ColorRenderer

New inits the color renderer

func (ColorRenderer) RenderDescription

func (r ColorRenderer) RenderDescription(line string) string

RenderDescription returns a formatted description

func (ColorRenderer) RenderExample

func (r ColorRenderer) RenderExample(line string) string

RenderExample returns a formatted example header

func (ColorRenderer) RenderPlatform

func (r ColorRenderer) RenderPlatform(line string) string

RenderPlatform returns a formatted platform

func (ColorRenderer) RenderSyntax

func (r ColorRenderer) RenderSyntax(line string) string

RenderSyntax returns formatted example syntax

func (ColorRenderer) RenderTitle

func (r ColorRenderer) RenderTitle(line string) string

RenderTitle returns a formatted title

type PageRenderer

type PageRenderer interface {
	RenderTitle(string) string
	RenderPlatform(string) string
	RenderDescription(string) string
	RenderExample(string) string
	RenderSyntax(string) string
}

PageRenderer is an interface for rendering the output of a page

Jump to

Keyboard shortcuts

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