Skip to main content

Render

Evaluates templates in each command with the equivalent value from passed args. Templates are case-insensitive If a command isn't a valid template or failed to evaluate, it'll be returned as is. Refer to the package docs for a list of supported templates NOTE: I wanted to do in-place replacement, until I realized that in-place replacement will alter the definition of the graph. This is not desirable, as we may have to retry and in that case the replacement will not work and we want to create a new location for outputs

def Render(
ctx: context.Context,
inputTemplate: []string,
params: Parameters
) - > []string, error

Evaluates templates in each command with the equivalent value from passed args. Templates are case-insensitive. If a command isn't a valid template or failed to evaluate, it'll be returned as is. Refer to the package docs for a list of supported templates.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the operation, used for logging and cancellation.
inputTemplate[]stringA slice of strings representing the templates to be evaluated.
paramsParametersA struct containing parameters required for template evaluation, including input and output paths, and task execution metadata. This parameter must have non-nil Inputs and OutputPath fields.

Returns

TypeDescription
[]string, errorA slice of strings with evaluated templates, or an error if template evaluation fails.