Skip to content

Commit

Permalink
refactor: drop superfluous return value
Browse files Browse the repository at this point in the history
Now that group summary rendering always produce something, it no
longer needs to indicate whether it did
  • Loading branch information
rade committed Dec 23, 2017
1 parent 03219f9 commit 17cea2e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions render/detailed/summary.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ func MakeNodeSummary(rc report.RenderContext, n report.Node) (NodeSummary, bool)
return summary, true
}
if strings.HasPrefix(n.Topology, "group:") {
summary, b := groupNodeSummary(baseNodeSummary(r, n), r, n)
return RenderMetricURLs(summary, n, rc.MetricsGraphURL), b
summary := groupNodeSummary(baseNodeSummary(r, n), r, n)
return RenderMetricURLs(summary, n, rc.MetricsGraphURL), true
}
return NodeSummary{}, false
}
Expand Down Expand Up @@ -348,7 +348,7 @@ func weaveNodeSummary(base NodeSummary, n report.Node) NodeSummary {

// groupNodeSummary renders the summary for a group node. n.Topology is
// expected to be of the form: group:container:hostname
func groupNodeSummary(base NodeSummary, r report.Report, n report.Node) (NodeSummary, bool) {
func groupNodeSummary(base NodeSummary, r report.Report, n report.Node) NodeSummary {
base.Label, base.Rank = n.ID, n.ID
if topology, _, ok := render.ParseGroupNodeTopology(n.Topology); ok {
if t, ok := r.Topology(topology); ok {
Expand All @@ -359,7 +359,7 @@ func groupNodeSummary(base NodeSummary, r report.Report, n report.Node) (NodeSum
}
}
base.Stack = true
return base, true
return base
}

func pluralize(counters report.Counters, key, singular, plural string) string {
Expand Down

0 comments on commit 17cea2e

Please sign in to comment.