Help us shape the future of Go! Take the 2026 Go Developer Survey

embedded

package
v1.234.0-nightly.41368... Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package embedded evaluates YAML functions found inside larger strings. Templates render before YAML functions, so a template can place a function's source inside other text. The caller supplies evaluation, which keeps this package free of configuration and stack processing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsProvisionalStackName

func IsProvisionalStackName(key string, value any) bool

IsProvisionalStackName reports a generated stack name built by a name template that transforms a function value, as in "{{ upper .vars.stage }}". Atmos replaces these fields with the final name once vars resolve, so the interim text isn't a value to evaluate.

func Resolve

func Resolve(input string, evaluate Evaluator) (string, error)

Resolve substitutes each function in input with its value, so "app-{{ .vars.region }}" produces the function's value inside the surrounding text.

func ResolveResult

func ResolveResult(result any, skipped func(tag string) bool, evaluate Evaluator) (any, error)

ResolveResult evaluates functions a result still carries, as when !template renders text containing another function's value. A skipped function returns its own source unchanged, so that result is left for later processing.

Types

type Evaluator

type Evaluator func(input string) (any, error)

Evaluator processes one string as a YAML function value.

Jump to

Keyboard shortcuts

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