From b8eeadda347dbf0448c6267675171b78ec91d458 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Fri, 22 Dec 2017 02:28:14 +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 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/render/detailed/summary.go b/render/detailed/summary.go index 5445349c9..124bbc775 100644 --- a/render/detailed/summary.go +++ b/render/detailed/summary.go @@ -348,12 +348,12 @@ func groupNodeSummary(base NodeSummary, r report.Report, n report.Node) (NodeSum } base.Label, base.Rank = label, label - t, ok := r.Topology(parts[1]) - if ok && t.Label != "" { - base.LabelMinor = pluralize(n.Counters, parts[1], t.Label, t.LabelPlural) + if t, ok := r.Topology(parts[1]); ok { + base.Shape = t.GetShape() + if t.Label != "" { + base.LabelMinor = pluralize(n.Counters, parts[1], t.Label, t.LabelPlural) + } } - - base.Shape = t.GetShape() base.Stack = true return base, true }