mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-02 01:30:30 +00:00
tiny tidy-up / refactor
This commit is contained in:
@@ -82,12 +82,16 @@ func (c connectionJoin) Render(rpt report.Report) Nodes {
|
||||
if !found {
|
||||
id, found = ipNodes[report.MakeScopedEndpointNodeID(scope, addr, port)]
|
||||
}
|
||||
if found && id != "" { // not one we blanked out earlier
|
||||
// We are guaranteed to find the id, so really this
|
||||
// should never end up creating a node.
|
||||
return id
|
||||
if !found || id == "" {
|
||||
return ""
|
||||
}
|
||||
return ""
|
||||
// Not an IP we blanked out earlier.
|
||||
//
|
||||
// MapEndpoints is guaranteed to find a node with this id
|
||||
// (and hence not have to create one), since we got the id
|
||||
// from ipNodes, which is populated from c.topology, which
|
||||
// is where MapEndpoints will look.
|
||||
return id
|
||||
}, c.topology).Render(rpt)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user