Documentation
¶
Overview ¶
Package cmdxtmpl expands fasttemplate tags ({{ }}) in command argument vectors, delegating each tag to a caller-supplied resolver. It builds and runs nothing: strings in, strings out.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Interpolate ¶
Interpolate returns a new slice the same length as args, with every {{ }} tag in each element replaced by the result of resolve. Whitespace surrounding the inner text is trimmed before resolve sees it, so {{ env.SHELL }} and {{env.SHELL}} are equivalent. Element count is invariant: tags are never split on whitespace and empty results are preserved in place.
The first resolve error aborts the call and is returned wrapped with the element index and tag; on success the input is never mutated.
Types ¶
This section is empty.