all: simplify nested complexity and if blocks ending with a return statement (#21854)
Changes: Simplify nested complexity If an if blocks ends with a return statement then remove the else nesting. Most of the changes has also been reported in golint https://goreportcard.com/report/github.com/ethereum/go-ethereum#golint
This commit is contained in:
@ -404,9 +404,8 @@ func (c *Client) Notify(ctx context.Context, method string, args ...interface{})
|
||||
|
||||
if c.isHTTP {
|
||||
return c.sendHTTP(ctx, op, msg)
|
||||
} else {
|
||||
return c.send(ctx, op, msg)
|
||||
}
|
||||
return c.send(ctx, op, msg)
|
||||
}
|
||||
|
||||
// EthSubscribe registers a subscripion under the "eth" namespace.
|
||||
|
Reference in New Issue
Block a user