diff options
Diffstat (limited to 'tablePatches.go')
| -rw-r--r-- | tablePatches.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tablePatches.go b/tablePatches.go index 1a8a1e2..8c55ca1 100644 --- a/tablePatches.go +++ b/tablePatches.go @@ -8,15 +8,16 @@ import ( "go.wit.com/log" ) -func (pset *Set) PrintTable() { +// returns footer +func (pset *Set) PrintTable() string { if pset == nil || pset.Patches == nil { - return + return "pb was nil" } log.DaemonMode(true) // don't timestamp lines tablePB := pset.Patches.MakeTable() tablePB.PrintTable() - log.Printf("pset.DefaultTable: %d patches\n", pset.Patches.Len()) + return log.Sprintf("pset.DefaultTable: %d patches\n", pset.Patches.Len()) } func (pb *Sets) PrintTable() { @@ -30,12 +31,13 @@ func (pb *Sets) PrintTable() { } } -func (pb *Patches) PrintTable() { +// returns footer +func (pb *Patches) PrintTable() string { log.DaemonMode(true) // don't timestamp lines tablePB := pb.MakeTable() tablePB.PrintTable() - log.Printf("pb.DefaultTable: %d patches\n", pb.Len()) + return log.Sprintf("pb.DefaultTable: %d patches\n", pb.Len()) } func (pb *Patches) MakeTable() *PatchesTable { |
