mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdserver/api/v2discovery: simplify !(x == y) to x != y
Found using https://go-critic.github.io/overview#boolExprSimplify-ref
This commit is contained in:
parent
90a2fbe50e
commit
d0f800c930
@ -275,7 +275,7 @@ func (d *discovery) checkCluster() ([]*client.Node, int, uint64, error) {
|
|||||||
var nodes []*client.Node
|
var nodes []*client.Node
|
||||||
// append non-config keys to nodes
|
// append non-config keys to nodes
|
||||||
for _, n := range resp.Node.Nodes {
|
for _, n := range resp.Node.Nodes {
|
||||||
if !(path.Base(n.Key) == path.Base(configKey)) {
|
if path.Base(n.Key) != path.Base(configKey) {
|
||||||
nodes = append(nodes, n)
|
nodes = append(nodes, n)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user