templating

package
v1.0.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(tmpl *template.Template, data any, dest string) error

Execute runs Execute function from input tmpl with input data and write result to given dest file.

func FuncMap

func FuncMap() template.FuncMap

FuncMap returns a minimal template.FuncMap.

Available functions are fromYaml, map, prefix, suffix and toYaml.

func GetRights

func GetRights(dest string) os.FileMode

GetRights returns the appropriate file mode according to input file path.

func WriteFile

func WriteFile(dest string, content []byte) error

WriteFile removes dest and rewrites it with input content. It's done as is to ensure file rights are recalculated.

Types

This section is empty.

Jump to

Keyboard shortcuts

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