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:
@ -219,9 +219,8 @@ func (n *autodisc) String() string {
|
||||
defer n.mu.Unlock()
|
||||
if n.found == nil {
|
||||
return n.what
|
||||
} else {
|
||||
return n.found.String()
|
||||
}
|
||||
return n.found.String()
|
||||
}
|
||||
|
||||
// wait blocks until auto-discovery has been performed.
|
||||
|
Reference in New Issue
Block a user