Skip to content

Commit

Permalink
chore: Avoid variable name collision with imported package name (#3335)
Browse files Browse the repository at this point in the history
  • Loading branch information
terrytangyuan committed Jun 29, 2020
1 parent ca822af commit c3d8571
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions workflow/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,20 +203,20 @@ func ApplySubmitOpts(wf *wfv1.Workflow, opts *wfv1.SubmitOpts) error {
if opts.ServiceAccount != "" {
wf.Spec.ServiceAccountName = opts.ServiceAccount
}
labels := wf.GetLabels()
if labels == nil {
labels = make(map[string]string)
wfLabels := wf.GetLabels()
if wfLabels == nil {
wfLabels = make(map[string]string)
}
if opts.Labels != "" {
passedLabels, err := cmdutil.ParseLabels(opts.Labels)
if err != nil {
return fmt.Errorf("Expected labels of the form: NAME1=VALUE2,NAME2=VALUE2. Received: %s", opts.Labels)
}
for k, v := range passedLabels {
labels[k] = v
wfLabels[k] = v
}
}
wf.SetLabels(labels)
wf.SetLabels(wfLabels)
if len(opts.Parameters) > 0 || opts.ParameterFile != "" {
newParams := make([]wfv1.Parameter, 0)
passedParams := make(map[string]bool)
Expand Down

0 comments on commit c3d8571

Please sign in to comment.