summaryrefslogtreecommitdiff
path: root/humanTable.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-26 01:19:31 -0500
committerJeff Carr <[email protected]>2025-09-26 02:20:56 -0500
commit4d923f942fa406b253d5414e0b8d39a3a6012c18 (patch)
treeeebaef7875efaa668ee18d255befbfb21d75826a /humanTable.go
parenta23bb99c39b4a540627fdcc69cf2d58560f3445d (diff)
add PB table row debug()v0.0.9
Diffstat (limited to 'humanTable.go')
-rw-r--r--humanTable.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/humanTable.go b/humanTable.go
index 6c94a60..6c0e803 100644
--- a/humanTable.go
+++ b/humanTable.go
@@ -22,7 +22,7 @@ func StandardTableRow(sizes []int, args []string) (string, string) {
var cell string
var sfmt string
if si < 0 {
- sfmt = "%-s"
+ sfmt = "%-80s"
} else if si == 0 {
sfmt = "%-8.8s"
} else {
@@ -50,6 +50,16 @@ func StandardTableRow(sizes []int, args []string) (string, string) {
return line[0:small], strings.Join(fmts, " ")
}
+func StandardTableRowDebug(sizes []int, args []string) (string, string) {
+ for i, si := range sizes {
+ if len(args) > i {
+ args[i] = fmt.Sprintf("(%d)%s", si, args[i])
+ // cell = fmt.Sprintf(sfmt, val)
+ }
+ }
+ return StandardTableRow(sizes, args)
+}
+
func StandardTableSize5(sizes []int, args []string) string {
WIDTH, _ := getTerminalWidth()
var s string