Documentation
¶
Index ¶
- func EnvMap(replaceMap map[string]string) map[string]interface{}
- func IsMissingVariableErr(err error) bool
- func IsPlaceholder(s string) bool
- func NewPlaceholder(index int) string
- func Replace(s string, replaceMap map[string]any, allowUnresolved bool) (string, error)
- func ReplaceStrictAny(s string, replaceMap map[string]any, strictPrefixes []string) (string, error)
- func ResolveVar(s string, m map[string]interface{}) (interface{}, error)
- func ToAnyMap(m map[string]string) map[string]any
- func Validate(s string, validator func(tag string) error) error
- type Template
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsMissingVariableErr ¶ added in v3.7.11
func IsPlaceholder ¶ added in v3.7.11
IsPlaceholder reports whether s is an internal Argo placeholder value.
func NewPlaceholder ¶ added in v3.7.11
NewPlaceholder generates an internal Argo placeholder string for the given index.
func Replace ¶
Replace takes a json-formatted string and performs variable replacement. Values are raw: a nil entry marks an absent optional (a skipped/omitted node's output with no default), and a simple tag resolving to nil is a terminal error regardless of allowUnresolved, which only governs tags whose key is missing entirely.
func ReplaceStrictAny ¶ added in v3.7.16
ReplaceStrictAny behaves like Replace but enforces that tags starting with any of strictPrefixes MUST be resolved, even if allowUnresolved behavior is otherwise active (implicit). It takes raw values, preserving nil entries so that expression tags can distinguish an absent (nil) value from an empty string (e.g. via `??`). A simple tag resolving to a nil value is a terminal error (not a missing-variable error): an absent optional must be handled by a producer default, a consumer input default (dropping the argument before substitution), or an expression fallback.