render

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package render expands the demos' *.yaml.tmpl files.

The install scripts drove these through sed with two distinct behaviors: substitute a ${PLACEHOLDER} with a value, or delete the whole line when the placeholder is not in play. Both are reproduced here so the rendered manifests stay byte-identical to what the shell pipeline produced.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Expand

func Expand(body string, values map[string]string, drop []string) []byte

Expand applies the substitution and line-deletion rules to a template body.

func Template

func Template(path string, values map[string]string, drop []string) ([]byte, error)

Template renders a *.yaml.tmpl file.

values maps a placeholder name (without the ${} wrapper) to its replacement. Any placeholder named in drop causes every line mentioning it to be removed, matching sed's `/\${NAME}/d`. A placeholder that appears in neither map is left untouched, so an unexpected template variable surfaces as invalid YAML rather than silently disappearing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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