templates

package
v0.30.16 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ApplicationFS, _ = fs.Sub(applicationFS, "application")

ApplicationFS contains application template files, rooted at the application directory.

View Source
var ModuleFS, _ = fs.Sub(moduleFS, "module")

ModuleFS contains module template files, rooted at the module directory.

View Source
var WerfFS, _ = fs.Sub(werfFS, "werf")

WerfFS contains werf templates for build, rooted at the werf directory.

Functions

func Clean

func Clean(templateFS fs.FS, output string) error

Clean removes all files and empty directories that Render would produce from the output directory. After removing each file, it attempts to remove parent directories up to the output root. Non-empty directories are silently skipped.

func Render

func Render(templateFS fs.FS, output string, opts Options) error

Render walks the filesystem and renders each file to the output directory. Files with the .tmpl extension are executed as Go templates (the extension is stripped from the output filename). All other files are copied as-is.

Types

type Options

type Options struct {
	Data    any
	Exclude []string
}

Jump to

Keyboard shortcuts

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