compose-go/template
Kay van Dijk 28a9e1350a Extract variables nested in required-error messages
ExtractVariables already walked nested interpolations in :- and :+
operands, but not in the :? / ? error message. So ${U:?${B}} and
${U?$B} only reported U, even though Substitute expands B when it
builds the missing-variable error.

The compose spec lists ${VARIABLE?$FOO} among nested interpolations.
Walk the required-error operand the same way as the default and
presence ones.

Fixes #934

Signed-off-by: Kay van Dijk <git@vandijk.one>
History 2026-11-09 09:16:25 +01:00
..
template.go Revert the Logger option: warnings go through the global logrus logger again 2026-10-25 14:08:20 +01:00
template_fuzz_test.go Revert the Logger option: warnings go through the global logrus logger again 2026-10-25 14:08:20 +01:00
template_test.go fix: avoid eager default interpolation 2026-01-16 08:37:13 +01:00
variables.go Extract variables nested in required-error messages 2026-11-09 09:16:25 +01:00
variables_test.go Extract variables nested in required-error messages 2026-11-09 09:16:25 +01:00