aac139368f
Moves all packages from internal/ to pkg/ so they can be imported by external modules (needed for claude-pm integration). - internal/app/ → pkg/app/ - internal/docker/ → pkg/docker/ - internal/config/ → pkg/config/ - internal/utils/ → pkg/utils/ Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
27 lines
469 B
Go
27 lines
469 B
Go
package utils
|
|
|
|
import (
|
|
"strings"
|
|
|
|
"github.com/olekukonko/tablewriter"
|
|
)
|
|
|
|
func FormatTable(data [][]string) string {
|
|
var sb strings.Builder
|
|
table := tablewriter.NewWriter(&sb)
|
|
table.SetHeader([]string{})
|
|
table.SetBorder(false)
|
|
table.SetColMinWidth(0, 10)
|
|
table.SetColMinWidth(1, 20)
|
|
table.SetColMinWidth(2, 25)
|
|
table.SetColMinWidth(3, 15)
|
|
table.SetColMinWidth(4, 20)
|
|
|
|
for _, row := range data {
|
|
table.Append(row)
|
|
}
|
|
|
|
table.Render()
|
|
return sb.String()
|
|
}
|