render

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModChart = "chart"
	ModPage  = "page"
)

Variables

This section is empty.

Functions

func MustTemplate

func MustTemplate(name string, contents []string) *template.Template

MustTemplate creates a new template with the given name and parsed contents.

Types

type Renderer

type Renderer interface {
	Render(w io.Writer) error
}

Renderer Any kinds of charts have their render implementation and you can define your own render logic easily.

func NewChartRender

func NewChartRender(c interface{}, before ...func()) Renderer

NewChartRender returns a render implementation for Chart.

func NewPageRender

func NewPageRender(c interface{}, before ...func()) Renderer

NewPageRender returns a render implementation for Page.

Jump to

Keyboard shortcuts

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