fix formatting bug
This commit is contained in:
parent
56a24ff4b8
commit
3c08825613
|
@ -62,7 +62,7 @@ func FormatTaskTable(tasks []*task.LocalTask, cols []Column) string {
|
||||||
data = append(data, line)
|
data = append(data, line)
|
||||||
}
|
}
|
||||||
|
|
||||||
return fmt.Sprintf("\n%s", FormatTable(data))
|
return fmt.Sprintf("\n%s\n", FormatTable(data))
|
||||||
}
|
}
|
||||||
|
|
||||||
func FormatTask(t *task.LocalTask) string {
|
func FormatTask(t *task.LocalTask) string {
|
||||||
|
@ -120,7 +120,7 @@ func FormatTable(data [][]string) string {
|
||||||
if len(data) == 0 {
|
if len(data) == 0 {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
max := make([]int, len(data))
|
max := make([]int, len(data[0]))
|
||||||
for _, line := range data {
|
for _, line := range data {
|
||||||
for i, col := range line {
|
for i, col := range line {
|
||||||
if len(col) > max[i] {
|
if len(col) > max[i] {
|
||||||
|
@ -146,7 +146,7 @@ func FormatTable(data [][]string) string {
|
||||||
if r%3 == 0 {
|
if r%3 == 0 {
|
||||||
output += fmt.Sprintf("%s", "\x1b[49m")
|
output += fmt.Sprintf("%s", "\x1b[49m")
|
||||||
}
|
}
|
||||||
output += "\r\n"
|
output += "\n"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue