templatedir

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TemplateDir

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

TemplateDir defines a directory containing directories and files, including template files

func New

func New(fs fs.FS) *TemplateDir

New attempts to create a new TemplateDir from the given FS

func (*TemplateDir) Extract

func (t *TemplateDir) Extract(targetDirectory string, data interface{}) error

Extract the templates to the given directory, using data as input

func (*TemplateDir) IgnoreFile added in v1.0.0

func (t *TemplateDir) IgnoreFile(filename string)

IgnoreFile will add the given filename to the list of files to ignore during extraction

func (*TemplateDir) RenameFiles added in v1.0.3

func (t *TemplateDir) RenameFiles(renameFiles map[string]string)

func (*TemplateDir) SetTemplateFilters added in v0.0.4

func (t *TemplateDir) SetTemplateFilters(filters []string)

SetTemplateFilters sets the template filter. Each filename is checked to see if it contains this string and if so, it is deemed to be a template file

Jump to

Keyboard shortcuts

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