tpl

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package tpl renders nelmwave manifests and *.tpl datasources through gomplate v5, using [[ ]] action delimiters by default.

The rendering context intentionally exposes only environment access (.Env, getenv) plus gomplate's standard function namespaces (strings, datasource, file, ...). Per-release data is not available while rendering the root manifest — releases are expanded from the parsed structure afterwards.

Index

Constants

View Source
const (
	DefaultLeftDelim  = "[["
	DefaultRightDelim = "]]"
)

Default action delimiters. [FIXED] by the project spec.

Variables

This section is empty.

Functions

func Render

func Render(ctx context.Context, name string, src []byte, opts Options) ([]byte, error)

Render renders src as a gomplate template and returns the result. name is used only in error messages.

Types

type Options

type Options struct {
	// LeftDelim / RightDelim override the action delimiters. Empty values fall
	// back to the [[ ]] defaults.
	LeftDelim  string
	RightDelim string
	// Funcs are extra template functions merged on top of gomplate's built-ins.
	Funcs template.FuncMap
	// Datasources registers gomplate datasources by name (name -> URL) available
	// to the template via ds/datasource/include.
	Datasources map[string]string
}

Options tune a single render.

Jump to

Keyboard shortcuts

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