cosmetic: move a function

This commit is contained in:
Matthias Radestock
2017-11-22 09:44:29 +00:00
parent 334dba20e7
commit f56a44e67d

View File

@@ -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 {