Documentation
¶
Overview ¶
Package templatefuncs holds Go text/template functions Atmos authors itself (as opposed to Sprig's or Gomplate's), meant to be registered alongside them in every FuncMap Atmos builds -- scaffold templates, stack config templates, locals, secrets/store reference templates, and toolchain asset templates alike.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollectKeys ¶
CollectKeys is the "collectKeys" template function. With no extra argument it returns v's top-level keys, sorted. With a nestedKey argument, it collects nestedKey's own keys from every one of v's values, flattening and deduplicating across all of them -- e.g. collectKeys(environments, "regions") returns every region used by any environment.
Sprig's own "keys" takes multiple maps and returns their union unsorted, with no nested-key mode -- CollectKeys is registered under its own name so it doesn't shadow it.
Types ¶
This section is empty.