Skip to content

Commit

Permalink
Directly check the return error
Browse files Browse the repository at this point in the history
The patchset simplifies the code by directly checking the return error,
    which follows the Go style.

Change-Id: I1138688b89200c6bcb0b18f854c46f03815ad15d
Signed-off-by: Baohua Yang <[email protected]>
Signed-off-by: Baohua Yang <[email protected]>
  • Loading branch information
yeasy authored and denyeart committed Dec 18, 2023
1 parent 9b717af commit a928a72
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions integration/ordererclient/orderer_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ func Broadcast(n *nwo.Network, o *nwo.Orderer, env *common.Envelope) (*orderer.B
return nil, err
}

err = broadcaster.Send(env)
if err != nil {
if err = broadcaster.Send(env); err != nil {
return nil, err
}

Expand All @@ -48,8 +47,7 @@ func Deliver(n *nwo.Network, o *nwo.Orderer, env *common.Envelope) (*common.Bloc
return nil, err
}

err = deliverer.Send(env)
if err != nil {
if err = deliverer.Send(env); err != nil {
return nil, err
}

Expand Down

0 comments on commit a928a72

Please sign in to comment.