From 1b55067ce99c29acb74fed1b837a3bdc44c77ff3 Mon Sep 17 00:00:00 2001 From: Tobias Weber <23548161+toweber@users.noreply.github.com> Date: Sun, 8 Dec 2024 21:36:55 +0000 Subject: [PATCH] fix automerge for --wide option --- cmd/inspect.go | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/cmd/inspect.go b/cmd/inspect.go index 49531c722..39036c723 100644 --- a/cmd/inspect.go +++ b/cmd/inspect.go @@ -267,6 +267,9 @@ func printContainerInspect(containers []runtime.GenericContainer, format string) if wide { header = slices.Insert(header, 1, "Owner") + table.SetColumnConfigs([]tableWriter.ColumnConfig{ + {Number: 1, AutoMerge: true}, + }) } if all { @@ -276,16 +279,19 @@ func printContainerInspect(containers []runtime.GenericContainer, format string) {Number: 2, AutoMerge: true}, }) table.AppendHeader(append(tableWriter.Row{"Topology"}, header...)) + + if wide { + table.SetColumnConfigs([]tableWriter.ColumnConfig{ + {Number: 1, AutoMerge: true}, + {Number: 2, AutoMerge: true}, + {Number: 3, AutoMerge: true}, + }) + } + } else { table.AppendHeader(append(tableWriter.Row{}, header[1:]...)) } - if wide { - table.SetColumnConfigs([]tableWriter.ColumnConfig{ - {Number: 2, AutoMerge: true}, - }) - } - table.AppendRows(tabData) table.Render()