Documentation
¶
Overview ¶
Package vars provides shared regex patterns and utilities for variable expansion.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ChainVar = regexp.MustCompile(`\$\{[^}]*\.[^}]+\}|\$[a-zA-Z0-9_\-]+\.[a-zA-Z0-9_\-\.]+`)
ChainVar matches ${step.field} patterns (contains a dot).
var EnvOnly = regexp.MustCompile(`\$\{([A-Za-z_][A-Za-z0-9_]*)\}|\$([A-Za-z_][A-Za-z0-9_]*)`)
EnvOnly matches $VAR and ${VAR} patterns without dots (environment variables only). Group 1: contents inside ${...} Group 2: token after $...
var Expansion = regexp.MustCompile(`\$\{([^}]+)\}|\$([a-zA-Z0-9_\-\.]+)`)
Expansion matches $VAR and ${VAR} patterns, including dots for chain references. Group 1: contents inside ${...} Group 2: token after $...
Functions ¶
func ExpandString ¶
ExpandString replaces all $VAR and ${VAR} occurrences in input using the resolver.
func HasChainVars ¶
HasChainVars returns true if the string contains chain variable references (${step.field}).
func HasEnvVars ¶
HasEnvVars returns true if the string contains environment variable references ($VAR or ${VAR}).