Skip to content

Commit

Permalink
Use strings.Builder
Browse files Browse the repository at this point in the history
  • Loading branch information
Ice3man543 committed Nov 12, 2020
1 parent 0a760a4 commit 302ca4d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion v2/pkg/workflows/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ func (w *Workflow) generateLogicFromWorkflows() error {
}

func (w *Workflow) generateTemplateFunc(template *WorkflowTemplate, workflowBuilder *strings.Builder) error {
ID := "var_" + ksuid.New().String()
builder := &strings.Builder{}
builder.WriteString("var_")
builder.WriteString(ksuid.New().String())
ID := builder.String()
w.Variables[ID] = template.Template

if len(template.Subtemplates) > 0 && len(template.Matchers) > 0 {
Expand Down

0 comments on commit 302ca4d

Please sign in to comment.