From 07e9c173bf54b81502715f265aeba1c279143699 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Sun, 27 Oct 2019 14:27:44 +0000 Subject: [PATCH] refactor: remove unused parameterisation of containerWithImageNameRenderer --- render/container.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/render/container.go b/render/container.go index 8ec46f1fe..6a19614c5 100644 --- a/render/container.go +++ b/render/container.go @@ -115,14 +115,12 @@ func HasChildren(topology string) FilterFunc { } } -type containerWithImageNameRenderer struct { - Renderer -} +type containerWithImageNameRenderer struct{} // Render produces a container graph where the the latest metadata contains the // container image name, if found. func (r containerWithImageNameRenderer) Render(ctx context.Context, rpt report.Report) Nodes { - containers := r.Renderer.Render(ctx, rpt) + containers := ContainerRenderer.Render(ctx, rpt) images := SelectContainerImage.Render(ctx, rpt) outputs := make(report.Nodes, len(containers.Nodes)) @@ -154,7 +152,7 @@ func (r containerWithImageNameRenderer) Render(ctx context.Context, rpt report.R // ContainerWithImageNameRenderer is a Renderer which produces a container // graph where the ranks are the image names, not their IDs -var ContainerWithImageNameRenderer = Memoise(containerWithImageNameRenderer{ContainerRenderer}) +var ContainerWithImageNameRenderer = Memoise(containerWithImageNameRenderer{}) // ContainerImageRenderer is a Renderer which produces a renderable container // image graph by merging the container graph and the container image topology.