template

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(path string) (string, error)

Get returns the content of an embedded template file. path is relative to the files/ directory, e.g. "query/cpp/new-query.tmpl".

func Render

func Render(tmplContent string, data any) (string, error)

Render executes a template string with [[ ]] delimiters and the given data. [[ ]] delimiters are used to avoid conflicts with GitHub Actions {{ }} syntax.

func WriteFile

func WriteFile(tmplContent, dst string, data any, overwrite bool) error

WriteFile renders a template string and writes the output to dst. If overwrite is false and dst already exists, the write is skipped.

Types

This section is empty.

Jump to

Keyboard shortcuts

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