diff options
| author | Jeff Carr <[email protected]> | 2025-09-05 12:53:19 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-05 12:53:19 -0500 |
| commit | 822fe38eee03193930dab310c6dba75a1bc1d6aa (patch) | |
| tree | 8522aac00f8bd7d68fd4124366ba4b910a7fbfd0 /humanTable.go | |
| parent | 817107dc160071ca3fe1c196335d6747271f3c99 (diff) | |
work on patch tracking
Diffstat (limited to 'humanTable.go')
| -rw-r--r-- | humanTable.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/humanTable.go b/humanTable.go index 2b25728..2a45304 100644 --- a/humanTable.go +++ b/humanTable.go @@ -363,3 +363,29 @@ func (psets *Patchsets) PrintTable() { } log.Infof("Total Contents (%d) Parts (%d)\n", countCONTENTS, countPARTS) } + +func (patches *Patches) PrintTable() { + if patches == nil { + return + } + log.DaemonMode(true) + + // print the header + args := []string{"commit hash", "new hash", "", "", "name", "Repo Namespace", "", "", "", "", ""} + sizes := []int{12, 12, 3, 3, 40, 80, 2, 2, 2, 2} + log.Info(cobol.TerminalChomp(cobol.StandardTableSize10(sizes, args))) + + var countPARTS int + for x, p := range patches.GetPatches() { + var args []string + partId := log.Sprintf("%d", x) + + _, fname := filepath.Split(p.GetFilename()) + args = []string{p.CommitHash, p.NewHash, partId, fname, p.GetNamespace(), "", "", "", "", ""} + + start := cobol.StandardTableSize10(sizes, args) + log.Info(cobol.TerminalChomp(start)) + countPARTS += 1 + } + log.Infof("Total Patches (%d)\n", countPARTS) +} |
