tmpl

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Indirect

func Indirect(value interface{}) interface{}

Indirect returns the value of a pointer

Types

type TemplateBundle

type TemplateBundle struct {
	TemplateDir string           // template directory in the template bundle
	OutputFile  string           // output file
	Regenerate  bool             // regenerate output file if it already exists
	FS          embed.FS         //	template bundle file system
	FuncMap     template.FuncMap // template functions
}

TemplateBundle contains configuration of a template bundle

func (*TemplateBundle) Generate

func (tb *TemplateBundle) Generate(outputDir string, data any) error

type TemplateBundleList

type TemplateBundleList []*TemplateBundle

TemplateBundleList is a list of template bundles

func (*TemplateBundleList) Add

Add adds or replaces template bundle by output file

func (*TemplateBundleList) Generate

func (t *TemplateBundleList) Generate(outputDir string, data any) error

Generate generates the template bundle list

func (*TemplateBundleList) Remove

func (t *TemplateBundleList) Remove(outputFile string) *TemplateBundleList

Remove removes template bundle by output file

Jump to

Keyboard shortcuts

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