Skip to content

Commit

Permalink
fix automerge for --wide option
Browse files Browse the repository at this point in the history
  • Loading branch information
toweber committed Dec 8, 2024
1 parent 37adecb commit 1b55067
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions cmd/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand 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()
Expand Down

0 comments on commit 1b55067

Please sign in to comment.