Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Move not-lines-related table.Write out of the loop
  • Loading branch information
hongkailiu committed Aug 14, 2025
commit 5f1dbb8b1a671ba1ff3f65332e4d4ad60009528f
6 changes: 3 additions & 3 deletions pkg/cli/admin/upgrade/status/controlplane.go
Original file line number Diff line number Diff line change
Expand Up @@ -499,11 +499,11 @@ func (d *controlPlaneStatusDisplayData) Write(f io.Writer, detailed bool, now ti
reason = "-"
}
lines := strings.Split(o.Condition.Message, "\n")
_, _ = table.Write([]byte(o.Name + "\t"))
_, _ = table.Write([]byte(shortDuration(now.Sub(o.Condition.LastTransitionTime.Time)) + "\t"))
_, _ = table.Write([]byte(ellipsis(reason, 20) + "\t"))
for i, line := range lines {
if i == 0 {
_, _ = table.Write([]byte(o.Name + "\t"))
_, _ = table.Write([]byte(shortDuration(now.Sub(o.Condition.LastTransitionTime.Time)) + "\t"))
_, _ = table.Write([]byte(ellipsis(reason, 20) + "\t"))
_, _ = table.Write([]byte(line + "\n"))
} else {
_, _ = table.Write([]byte("\t\t\t" + line + "\n"))
Expand Down