mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 02:00:43 +00:00
cosmetic: move a function
This commit is contained in:
@@ -136,6 +136,13 @@ func (f Filter) Render(rpt report.Report) Nodes {
|
||||
// from it
|
||||
const IsConnectedMark = "is_connected"
|
||||
|
||||
// IsConnected checks whether the node has been marked with the
|
||||
// IsConnectedMark.
|
||||
func IsConnected(node report.Node) bool {
|
||||
_, ok := node.Latest.Lookup(IsConnectedMark)
|
||||
return ok
|
||||
}
|
||||
|
||||
// ColorConnected colors nodes with the IsConnectedMark key if they
|
||||
// have edges to or from them. Edges to/from yourself are not counted
|
||||
// here (see #656).
|
||||
@@ -164,13 +171,6 @@ func ColorConnected(r Renderer) Renderer {
|
||||
}
|
||||
}
|
||||
|
||||
// IsConnected checks whether the node has been marked with the
|
||||
// IsConnectedMark.
|
||||
func IsConnected(node report.Node) bool {
|
||||
_, ok := node.Latest.Lookup(IsConnectedMark)
|
||||
return ok
|
||||
}
|
||||
|
||||
// FilterUnconnected produces a renderer that filters unconnected nodes
|
||||
// from the given renderer
|
||||
func FilterUnconnected(r Renderer) Renderer {
|
||||
|
||||
Reference in New Issue
Block a user