diff options
| -rw-r--r-- | tableDefault.go | 4 | ||||
| -rw-r--r-- | tableForged.go | 4 | ||||
| -rw-r--r-- | tablePatches.go | 12 | ||||
| -rw-r--r-- | tablePull.go | 5 |
4 files changed, 14 insertions, 11 deletions
diff --git a/tableDefault.go b/tableDefault.go index c3dba27..5c2d3e9 100644 --- a/tableDefault.go +++ b/tableDefault.go @@ -13,7 +13,7 @@ func (f *Forge) PrintTable(pb *gitpb.Repos) { f.PrintDefaultTB(pb) } -func (f *Forge) PrintDefaultTB(pb *gitpb.Repos) { +func (f *Forge) PrintDefaultTB(pb *gitpb.Repos) string { tablePB := f.makeDefaultTB(pb) tablePB.PrintTable() var dirty int @@ -34,7 +34,7 @@ func (f *Forge) PrintDefaultTB(pb *gitpb.Repos) { writable += 1 } } - log.Printf("f.DefaultRepos: total=(%d) dirty=(%d) writable=(%d) binaries=(%d) protobufs(%d)\n", pb.Len(), dirty, writable, bins, protos) + return log.Sprintf("f.DefaultRepos: total=(%d) dirty=(%d) writable=(%d) binaries=(%d) protobufs(%d)\n", pb.Len(), dirty, writable, bins, protos) } func (f *Forge) getRepoType(repo *gitpb.Repo) string { diff --git a/tableForged.go b/tableForged.go index eef7d81..03eae30 100644 --- a/tableForged.go +++ b/tableForged.go @@ -7,10 +7,10 @@ import ( "go.wit.com/log" ) -func (f *Forge) PrintForgedTable(pb *gitpb.Repos) { +func (f *Forge) PrintForgedTable(pb *gitpb.Repos) string { tablePB := f.makeForgedTable(pb) tablePB.PrintTable() - log.Printf("fpb.ForgedTable: %d repos\n", pb.Len()) + return log.Sprintf("fpb.ForgedTable: %d repos\n", pb.Len()) } func (f *Forge) makeForgedTable(pb *gitpb.Repos) *gitpb.ReposTable { 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 { diff --git a/tablePull.go b/tablePull.go index 2e87e40..ebe062f 100644 --- a/tablePull.go +++ b/tablePull.go @@ -9,10 +9,11 @@ import ( "go.wit.com/log" ) -func (f *Forge) PrintPullTable(pb *gitpb.Repos) { +// returns footer +func (f *Forge) PrintPullTable(pb *gitpb.Repos) string { tablePB := f.makePullTable(pb) tablePB.PrintTable() - log.Printf("fpb.PullTable: %d repos\n", pb.Len()) + return log.Sprintf("fpb.PullTable: %d repos\n", pb.Len()) } func (f *Forge) makePullTable(pb *gitpb.Repos) *gitpb.ReposTable { |
