From d3cbe7eec61b2072a736eb7975a157914ee81a52 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 25 Sep 2025 23:48:31 -0500 Subject: add generic PrintTable() --- set.table.go | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'set.table.go') diff --git a/set.table.go b/set.table.go index 1ab2526..5bc2cb1 100644 --- a/set.table.go +++ b/set.table.go @@ -5,7 +5,6 @@ package forgepb import ( "time" - "go.wit.com/lib/cobol" "go.wit.com/log" ) @@ -20,10 +19,22 @@ func (pset *Set) PrintTable() { tablePB.PrintTable() } -func (mt *PatchesTable) PrintTable() { - // log.Info("ShowTable() SENDING TO GUI") - mt.MakeTable() - cobol.PrintTable(mt.pb) +func (pb *Sets) PrintTable() { + for pset := range pb.IterAll() { + if pset.Patches == nil { + continue + } + tablePB := pset.Patches.makeStandardTable() + tablePB.MakeTable() + tablePB.PrintTable() + } +} + +func (pb *Patches) PrintTable() { + log.DaemonMode(true) // don't timestamp lines + + tablePB := pb.makeStandardTable() + tablePB.PrintTable() } func (pb *Patches) makeStandardTable() *PatchesTable { -- cgit v1.2.3