Skip to content

Commit

Permalink
remove redundant codes (argoproj#1582)
Browse files Browse the repository at this point in the history
Signed-off-by: xiechengsheng <[email protected]>
  • Loading branch information
xiechengsheng authored and sarabala1979 committed Sep 4, 2019
1 parent 5bba844 commit cd04ab8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 25 deletions.
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

0 comments on commit cd04ab8

Please sign in to comment.