mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 05:05:23 +00:00
Fixed lint errors
This commit is contained in:
parent
142e3709c7
commit
4db5e92cee
@ -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
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user