From f315f5b6423e5c9d7e788e8eeb7ea33771530bf1 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 16 Oct 2025 15:17:51 -0500 Subject: try to sort by time. didn't work --- tablePB.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tablePB.go b/tablePB.go index 2cf42b0..cb06bfb 100644 --- a/tablePB.go +++ b/tablePB.go @@ -13,6 +13,11 @@ import ( ) func PrintTable(pb *guipb.Table) { + PrintTableLimit(pb, -1) +} + +// limits the number of out lines +func PrintTableLimit(pb *guipb.Table, limit int) { // fmt.Info("print PB here") if pb.Grid == nil { @@ -42,6 +47,7 @@ func PrintTable(pb *guipb.Table) { header, _ := StandardTableRow(sizes, args) fmt.Println(header) + var counter int // now print the table rows for i := range len(pb.AnyCols[0].Vals) { var cells []string @@ -57,6 +63,13 @@ func PrintTable(pb *guipb.Table) { line += "FMT: " + fmtline } fmt.Println(line) + if limit < 0 { + continue + } + counter += 1 + if counter > limit { + break + } } } -- cgit v1.2.3