refactor: remove unused parameterisation of containerWithImageNameRenderer

This commit is contained in:
Bryan Boreham
2019-10-27 14:27:44 +00:00
parent 0fc7917561
commit 07e9c173bf

View File

@@ -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.