INNER CODE UNIT · Go
func
robscott/kube-capacity · pkg/capacity/csv.go:78
func (cp *csvPrinter) Print(outputType string) {
cp.file = os.Stdout
sortedNodeMetrics := cp.cm.getSortedNodeMetrics(cp.opts.SortBy)
cp.printLine(&csvHeaderStrings)
if len(sortedNodeMetrics) > 1 {
cp.printClusterLine()
}
for _, nm := range sortedNodeMetrics {
cp.printNodeLine(nm.name, nm)
if cp.opts.ShowPods || cp.opts.ShowContainers {
podMetrics := nm.getSortedPodMetrics(cp.opts.SortBy)
for _, pm := range podMetrics {