mirror of
https://codeberg.org/scip/esctl.git
synced 2026-08-24 13:14:18 +02:00
use strings.Lines() iterator
This commit is contained in:
@@ -149,9 +149,11 @@ func (table *Table) PrintTSV() error {
|
|||||||
wrapped := wrapper(entry)
|
wrapped := wrapper(entry)
|
||||||
|
|
||||||
// and indent it
|
// and indent it
|
||||||
for idx, line := range strings.Split(wrapped, "\n") {
|
first := true
|
||||||
if idx == 0 {
|
for line := range strings.Lines(wrapped) {
|
||||||
|
if first {
|
||||||
entry = line
|
entry = line
|
||||||
|
first = false
|
||||||
} else {
|
} else {
|
||||||
entry += "\n " + strings.Repeat(" ", currentWidth) + line
|
entry += "\n " + strings.Repeat(" ", currentWidth) + line
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user