Documentation
¶
Overview ¶
Package templates provides utilities for parsing and analyzing Go templates.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractReferences ¶
ExtractReferences finds all field references in a template string. Returns the full field paths (e.g., ".steps.step1.output", ".params.message"). It uses FuncMap() to ensure templates with custom functions can be parsed.
func ExtractReferencesFromTemplate ¶
ExtractReferencesFromTemplate finds all field references in a parsed template.
func FuncMap ¶ added in v0.8.3
FuncMap returns the standard template functions available in composite tools. These functions are used both at validation time and runtime to ensure templates using json, quote, or fromJson are valid.
Smell: It is odd to expose this low-level detail of which functions are available to templating to other packages. Ideally, this would be encapsulated and the higher-level functions like validation would be implemented within this package. However, validation is currently implemented against the config types and not the composer types. We should make this function internal and consolidate all validation capabilities here once we've replaced the composer types for the config types. They are semantically the same and the config types represent the documented API types.
Types ¶
This section is empty.