Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant codes #1582

Merged
merged 1 commit into from
Sep 4, 2019
Merged
Show file tree
Hide file tree
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
5 changes: 1 addition & 4 deletions util/archive/archive.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,5 @@ func tarFile(sourcePath string, tw *tar.Writer) error {
return errors.InternalWrapError(err)
}
_, err = io.Copy(tw, f)
if err != nil {
return err
}
return nil
return err
}
5 changes: 1 addition & 4 deletions workflow/executor/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,5 @@ func CopyArchive(c KubernetesClientInterface, containerID, sourcePath, destPath
return err
}
err = w.Close()
if err != nil {
return err
}
return nil
return err
}
6 changes: 1 addition & 5 deletions workflow/executor/pns/pns.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,7 @@ func (p *PNSExecutor) CopyFile(containerID string, sourcePath string, destPath s
}

err = archive.TarGzToWriter(sourcePath, w)
if err != nil {
return err
}

return nil
return err
}

func (p *PNSExecutor) WaitInit() error {
Expand Down
5 changes: 1 addition & 4 deletions workflow/executor/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,5 @@ func (we *WorkflowExecutor) SaveResourceParameters(resourceNamespace string, res
log.Infof("Saved output parameter: %s, value: %s", param.Name, output)
}
err := we.AnnotateOutputs(nil)
if err != nil {
return err
}
return nil
return err
}
10 changes: 2 additions & 8 deletions workflow/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,7 @@ func SuspendWorkflow(wfIf v1alpha1.WorkflowInterface, workflowName string) error
}
return true, nil
})
if err != nil {
return err
}
return nil
return err
}

// ResumeWorkflow resumes a workflow by setting spec.suspend to nil and any suspended nodes to Successful.
Expand Down Expand Up @@ -347,10 +344,7 @@ func ResumeWorkflow(wfIf v1alpha1.WorkflowInterface, workflowName string) error
}
return true, nil
})
if err != nil {
return err
}
return nil
return err
}

const letters = "abcdefghijklmnopqrstuvwxyz0123456789"
Expand Down