Fixed lint errors

This commit is contained in:
Ice3man543 2021-07-06 13:59:38 +05:30
parent 142e3709c7
commit 4db5e92cee
2 changed files with 2 additions and 5 deletions

View File

@ -63,9 +63,7 @@ func Parse(filePath string, options protocols.ExecuterOptions) (*Template, error
if err != nil {
return nil, errors.Wrap(err, "could not create workflow loader")
}
if err := compileWorkflow(&options, compiled, loader); err != nil {
return nil, errors.Wrap(err, "could not compile workflow")
}
compileWorkflow(&options, compiled, loader)
template.CompiledWorkflow = compiled
template.CompiledWorkflow.Options = &options
}

View File

@ -8,14 +8,13 @@ import (
)
// compileWorkflow compiles the workflow for execution
func compileWorkflow(options *protocols.ExecuterOptions, workflow *workflows.Workflow, loader compile.WorkflowLoader) error {
func compileWorkflow(options *protocols.ExecuterOptions, workflow *workflows.Workflow, loader compile.WorkflowLoader) {
for _, workflow := range workflow.Workflows {
if err := parseWorkflow(workflow, options, loader); err != nil {
gologger.Warning().Msgf("Could not parse workflow: %v\n", err)
continue
}
}
return nil
}
// parseWorkflow parses and compiles all templates in a workflow recursively