templator

package module
v0.0.0-...-550add0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 License: MIT Imports: 9 Imported by: 0

README

templator

Use mustache-syle templating (with Go!)

Documentation

Index

Constants

View Source
const (
	DefaultDelimLeft  = "{{"
	DefaultDelimRight = "}}"
)

Variables

View Source
var (
	Debug bool
)

Functions

func ApplyTemplate

func ApplyTemplate(t *template.Template, w io.Writer, m map[string]any) error

func EnvMap

func EnvMap() map[string]any

func NewTemplate

func NewTemplate(name, contents, left, right string) (*template.Template, error)

func NewTemplateFS

func NewTemplateFS(name, left, right string, fs fs.FS, patterns ...string) (*template.Template, error)

func TemplateFiles

func TemplateFiles(src, dest, left, right string, m map[string]any) error

func TemplateFilesDefault

func TemplateFilesDefault(src, dest string, m map[string]any) error

func TemplateFilesDefaultEnv

func TemplateFilesDefaultEnv(src, dest string) error

func TemplateIO

func TemplateIO(r io.Reader, w io.Writer, left, right string, m map[string]any) error

func TemplateIOEnv

func TemplateIOEnv(r io.Reader, w io.Writer, left, right string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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