Skip to content

Commit

Permalink
gosimple fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
erwinvaneyk committed May 18, 2018
1 parent 46f1ae3 commit e8d83ed
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
6 changes: 1 addition & 5 deletions pkg/api/invocation/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,7 @@ func (ia *Api) Cancel(invocationId string) error {
Timestamp: ptypes.TimestampNow(),
Hints: &fes.EventHints{Completed: true},
}
err := ia.es.Append(event)
if err != nil {
return err
}
return nil
return ia.es.Append(event)
}

func (ia *Api) MarkCompleted(invocationId string, output *types.TypedValue) error {
Expand Down
6 changes: 1 addition & 5 deletions pkg/types/aggregates/invocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,7 @@ func (wi *WorkflowInvocation) ApplyEvent(event *fes.Event) error {
"event": event,
}).Warn("Skipping unimplemented event.")
}
if err != nil {
return err
}

return nil
return err
}

func (wi *WorkflowInvocation) applyTaskEvent(event *fes.Event) error {
Expand Down
6 changes: 2 additions & 4 deletions pkg/types/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,8 @@ func SingleDefaultInput(t *TypedValue) map[string]*TypedValue {
type Requires map[string]*TaskDependencyParameters

func (r Requires) Add(s ...string) Requires {
if s != nil {
for _, v := range s {
r[v] = nil
}
for _, v := range s {
r[v] = nil
}
return r
}
Expand Down

0 comments on commit e8d83ed

Please sign in to comment.