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