Skip to content

Commit

Permalink
clean up if else
Browse files Browse the repository at this point in the history
  • Loading branch information
CMGS committed Dec 20, 2021
1 parent 8ee9672 commit b0374f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions store/etcdv3/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,8 @@ func (m *Mercury) makeClient(ctx context.Context, node *types.Node) (client engi
log.Warnf(ctx, "[makeClient] Get key failed %v", err)
}
continue
} else {
data[i] = string(ev.Value)
}
data[i] = string(ev.Value)
}

return enginefactory.GetEngine(ctx, m.config, node.Name, node.Endpoint, data[0], data[1], data[2])
Expand Down
3 changes: 2 additions & 1 deletion store/etcdv3/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ func (m *Mercury) RemovePod(ctx context.Context, podname string) error {
resp, err := m.Delete(ctx, key)
if err != nil {
return err
} else if resp.Deleted != 1 {
}
if resp.Deleted != 1 {
return types.NewDetailedErr(types.ErrPodNotFound, podname)
}
return nil
Expand Down

0 comments on commit b0374f5

Please sign in to comment.