diff options
| author | Jeff Carr <[email protected]> | 2025-09-23 09:36:15 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-23 09:36:15 -0500 |
| commit | 4eada310b83d28d6406a6e44d453749e1ed9502a (patch) | |
| tree | 3e68fb99780c7c74560fbb94dc6a09ee4edfb6b5 | |
| parent | 643be0abeac87f4d71c43c221410b6bfc3191962 (diff) | |
make a standard set.PrintTable()
| -rw-r--r-- | patchset.Make.go | 4 | ||||
| -rw-r--r-- | set.table.go | 54 |
2 files changed, 26 insertions, 32 deletions
diff --git a/patchset.Make.go b/patchset.Make.go index 75c4215..c8bfdc0 100644 --- a/patchset.Make.go +++ b/patchset.Make.go @@ -140,7 +140,7 @@ func (pset *Set) makePatchSetNew(repo *gitpb.Repo) error { err = pset.addPatchFiles(repo, repoDir) log.Infof("Added %d patches for %s len=%d\n", len(r.Stdout), repo.FullPath, pset.Patches.Len()) - pset.PrintTable() + // pset.PrintTable() return err } @@ -186,7 +186,7 @@ func (p *Set) addPatchFiles(repo *gitpb.Repo, fullDir string) error { p.Patches = new(Patches) } p.Patches.Append(patch) - log.Info("ADDED PATCH FILE", path) + // log.Info("ADDED PATCH FILE", path) return nil }) return baderr diff --git a/set.table.go b/set.table.go index 8194346..2d8f1ac 100644 --- a/set.table.go +++ b/set.table.go @@ -20,16 +20,22 @@ func (pset *Set) PrintTable() { tablePB.PrintTable() } -func (pb *Sets) makeStandardTablePB() *SetsTable { +func (mt *PatchesTable) PrintTable() { + log.Info("ShowTable() SENDING TO GUI") + mt.MakeTable() + cobol.PrintTable(mt.pb) +} + +func (pb *Patches) makeStandardTable() *PatchesTable { t := pb.NewTable("tagList") t.NewUuid() - col := t.AddUuid() - col.Width = 12 + col := t.AddNamespace() + col.Width = 28 - col = t.AddTimeFunc("ctime", func(pset *Set) time.Time { + col = t.AddTimeFunc("ctime", func(p *Patch) time.Time { // todo - return pset.Ctime.AsTime() + return p.Ctime.AsTime() }) col.Width = 4 @@ -47,47 +53,35 @@ func (pb *Sets) makeStandardTablePB() *SetsTable { col.Width = 16 */ + col = t.AddPatchId() + col.Width = 8 + col = t.AddComment() - col.Width = -1 + col.Width = 16 - return t -} + col = t.AddFilename() + col.Width = 30 -func (mt *PatchesTable) PrintTable() { - // log.Info("ShowTable() SENDING TO GUI") - mt.MakeTable() - cobol.PrintTable(mt.pb) + return t } -func (pb *Patches) makeStandardTable() *PatchesTable { +/* +func (pb *Sets) makeStandardTablePB() *SetsTable { t := pb.NewTable("tagList") t.NewUuid() - col := t.AddNamespace() + col := t.AddUuid() col.Width = 12 - col = t.AddTimeFunc("ctime", func(p *Patch) time.Time { + col = t.AddTimeFunc("ctime", func(pset *Set) time.Time { // todo - return p.Ctime.AsTime() + return pset.Ctime.AsTime() }) col.Width = 4 - /* - col = t.AddTimeFunc("age", func(repo *gitpb.GitTag) time.Time { - // todo - return time.Now() - }) - col.Width = 4 - - col = t.AddStringFunc("Ref Name", func(r *gitpb.GitTag) string { - _, ref := filepath.Split(r.GetRefname()) - return ref - }) - col.Width = 16 - */ - col = t.AddComment() col.Width = -1 return t } +*/ |
