render

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const Footer = `` /* 165-byte string literal not displayed */

Variables

This section is empty.

Functions

func Funcs

func Funcs(fs afero.Fs, src string) map[string]any

Types

type Command

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

func NewCommand

func NewCommand(ctx context.Context, shell []string, dir string, envs []string) *Command

func (*Command) Run

func (c *Command) Run(s string) *CommandResult

type CommandResult

type CommandResult struct {
	Command        string
	ExitCode       int
	Stdout         string
	Stderr         string
	CombinedOutput string
	RunError       error
}

type Read

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

func NewRead

func NewRead(fs afero.Fs, base string) *Read

func (*Read) Run

func (r *Read) Run(fileName string) (string, error)

type Renderer

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

func NewRenderer

func NewRenderer(fs afero.Fs) *Renderer

func (*Renderer) NewTemplate

func (r *Renderer) NewTemplate() *template.Template

func (*Renderer) NewTemplateWithEnv

func (r *Renderer) NewTemplateWithEnv() *template.Template

func (*Renderer) Render

func (r *Renderer) Render(src, dest, txt string, fm *frontmatter.Frontmatter) error

func (*Renderer) SetDelims

func (r *Renderer) SetDelims(left, right string)

Jump to

Keyboard shortcuts

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