diff --git a/render/filters.go b/render/filters.go index cd8c8fa9a..150a6098e 100644 --- a/render/filters.go +++ b/render/filters.go @@ -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 {