Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions internal/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,16 @@ func (r *Runner) processInputElementWorker(inputs chan taskInput, wg *sync.WaitG
}

// normalizeAndQueueInputs normalizes the inputs and queues them for execution
// processLine splits a comma-separated input line and queues each non-empty item.
func (r *Runner) processLine(text string, inputs chan taskInput) {
for _, item := range strings.Split(text, ",") {
item = strings.TrimSpace(item)
if item != "" {
r.processInputItem(item, inputs)
}
}
}

func (r *Runner) normalizeAndQueueInputs(inputs chan taskInput) error {
// Process Normal Inputs
for _, text := range r.options.Inputs {
Expand All @@ -440,7 +450,7 @@ func (r *Runner) normalizeAndQueueInputs(inputs chan taskInput) error {
for scanner.Scan() {
text := scanner.Text()
if text != "" {
r.processInputItem(text, inputs)
r.processLine(text, inputs)
}
}
}
Expand All @@ -449,7 +459,7 @@ func (r *Runner) normalizeAndQueueInputs(inputs chan taskInput) error {
for scanner.Scan() {
text := scanner.Text()
if text != "" {
r.processInputItem(text, inputs)
r.processLine(text, inputs)
}
}
}
Expand Down