feat: closed box with right wall and padded rows

This commit is contained in:
lzrdblzzrd committed 2026-10-04 20:10:09 +03:00
1 parent ef0dc08bcd
commit c0a47bc99b
2 files changed
+25 -26

No files matched your search

+7 -8
View File
@@ -737,17 +737,16 @@ func renderBox(head string, groups []logGroup) {
}
}
ts := time.Now().Format("02.01.2006 15:04:05")
top := "┌─ " + ts + " "
if runeCount(top) < width {
top += strings.Repeat("─", width-runeCount(top))
} else {
width = runeCount(top)
base := "┌─ " + ts + " "
if width < runeCount(base) {
width = runeCount(base)
}
logRaw(top)
// Закрытый бокс: правая стенка у каждой строки.
logRaw(base + strings.Repeat("─", width-runeCount(base)) + "┐")
for _, line := range lines {
logRaw(line)
logRaw(line + strings.Repeat(" ", width-runeCount(line)) + "│")
}
logRaw("└" + strings.Repeat("─", width-1))
logRaw("└" + strings.Repeat("─", width-1) + "┘")
logRaw("")
}