From fc66827af7d7e77d4ec0b85503dd243a62378d0d Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Sat, 23 Dec 2017 22:39:08 +0000 Subject: [PATCH] refactor: don't set shape based on unitialised topology This doesn't make any difference to the outcome - we were simply setting the shape in the NodeSummary to "", which is what it starts out as - but looks less weird in the code. --- render/detailed/summary.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/render/detailed/summary.go b/render/detailed/summary.go index 0d0b24af0..507b586df 100644 --- a/render/detailed/summary.go +++ b/render/detailed/summary.go @@ -134,14 +134,15 @@ func (n NodeSummary) SummarizeMetrics() NodeSummary { } func baseNodeSummary(r report.Report, n report.Node) NodeSummary { - t, _ := r.Topology(n.Topology) summary := NodeSummary{ ID: n.ID, - Shape: t.GetShape(), Linkable: true, Parents: Parents(r, n), Adjacency: n.Adjacency, } + if t, ok := r.Topology(n.Topology); ok { + summary.Shape = t.GetShape() + } if _, ok := n.Counters.Lookup(n.Topology); ok { // This is a group of nodes, so no metadata, metrics, tables return summary