renderer

package
v0.4.0-beta.47 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package renderer renders the given AST to certain formats.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFlushingRenderer

func NewFlushingRenderer(options ...goldren.Option) goldren.Renderer

NewRenderer returns a new Renderer with given options.

Types

type Context

type Context struct {
	Env         map[string]string
	Output      io.Writer
	RundownFile string

	DepsCompleted map[string]bool
}

func NewContext

func NewContext(rundownFile string) *Context

func (*Context) AddEnv

func (c *Context) AddEnv(key string, value string)

func (*Context) CreateTempFile

func (c *Context) CreateTempFile(name string) (*os.File, error)

Opens a temporary file, and adds it's filename to the context environment.

func (*Context) ImportEnv

func (c *Context) ImportEnv(env map[string]string)

func (*Context) ImportRawEnv

func (c *Context) ImportRawEnv(env []string)

func (*Context) ResetEnv

func (c *Context) ResetEnv()

type RundownHtmlRenderer

type RundownHtmlRenderer struct {
	Context *Context
}

func NewRundownHtmlRenderer

func NewRundownHtmlRenderer(context *Context) *RundownHtmlRenderer

func (*RundownHtmlRenderer) RegisterFuncs

Directories

Path Synopsis
Package renderer renders the given AST to certain formats.
Package renderer renders the given AST to certain formats.
The styles here are copied from the awesome Glamour library
The styles here are copied from the awesome Glamour library
spinner
Package spinner is a simple package to add a spinner / progress indicator to any terminal application.
Package spinner is a simple package to add a spinner / progress indicator to any terminal application.

Jump to

Keyboard shortcuts

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