Skip to content

Commit ced3665

Browse files
committed
Let recommendation text flow without wrapping
1 parent 5c8f3b0 commit ced3665

1 file changed

Lines changed: 1 addition & 24 deletions

File tree

internal/output/table.go

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -91,31 +91,8 @@ func printInstanceTable(w io.Writer, instances []models.GPUInstance) {
9191
rec = inst.Recommendations[0].Description
9292
}
9393

94-
// Print first line
95-
recFirst, recRest := rec, ""
96-
if len(rec) > 70 {
97-
// Wrap at last space before column 70
98-
cut := 70
99-
for cut > 0 && rec[cut] != ' ' {
100-
cut--
101-
}
102-
if cut == 0 {
103-
cut = 70
104-
}
105-
recFirst = rec[:cut]
106-
recRest = rec[cut:]
107-
if len(recRest) > 0 && recRest[0] == ' ' {
108-
recRest = recRest[1:]
109-
}
110-
}
111-
11294
fmt.Fprintf(w, " %-36s %-26s $%9.0f %-16s %s\n",
113-
name, typeDesc, inst.MonthlyCost, signal, recFirst)
114-
if recRest != "" {
115-
// Indent continuation to align with recommendation column
116-
pad := 36 + 1 + 26 + 1 + 10 + 2 + 16 + 2
117-
fmt.Fprintf(w, " %s%s\n", strings.Repeat(" ", pad), recRest)
118-
}
95+
name, typeDesc, inst.MonthlyCost, signal, rec)
11996
}
12097
fmt.Fprintln(w)
12198
}

0 commit comments

Comments
 (0)