From aaeb5de034db1de0671f6360b270114f92e11397 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 5 Nov 2024 05:58:33 -0600 Subject: [PATCH] final commits before release Signed-off-by: Jeff Carr --- human.go | 41 ++++++++++++++++++++++------------------- scanIterator.go | 3 +++ 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/human.go b/human.go index cd322e7..79c218b 100644 --- a/human.go +++ b/human.go @@ -23,7 +23,7 @@ func (r *RepoRow) StandardHeader() string { devel := r.Status.GetDevelVersion() user := r.Status.GetUserVersion() - header := fmt.Sprintf("%-35s %5s %-12s %-12s %-20s %-20s %-20s %-15s", + header := fmt.Sprintf("%-35s %5s %-10s %-10s %-20s %-20s %-20s %-15s", r.Name(), shell.FormatDuration(dur), lastTag, target, master, devel, user, @@ -37,15 +37,18 @@ func msg(w http.ResponseWriter, s string) { fmt.Fprintln(w, s) } -func (v *RepoList) PrintReport(w http.ResponseWriter, readonly string, onlydirty string, perfect string) { - var count int - - header := fmt.Sprintf("%-35s %5s %-12s %-12s %-20s %-20s %-20s %-15s", +func ReportHeader() string { + return fmt.Sprintf("%-35s %5s %-10s %-10s %-20s %-20s %-20s %-15s", "REPO", "AGE", "LAST", "TARGET", "MASTER", "DEVEL", "USER", "STATE") - msg(w, header) +} + +func (v *RepoList) PrintReport(w http.ResponseWriter, readonly string, onlydirty string, perfect string) { + var count int + + msg(w, ReportHeader()) loop := v.ReposSortByName() for loop.Scan() { @@ -96,26 +99,26 @@ func (r *RepoRow) StandardReleaseHeader() string { user := r.Status.GetUserVersion() target := r.Status.GetTargetVersion() - header := fmt.Sprintf("%-35s %5s %-10s %-10s %-10s %-10s %-20s %-15s", - r.Name(), - shell.FormatDuration(dur), - curname, - lastTag, - master, - target, - user, + header := fmt.Sprintf("%-35s %5s %-10s %-10s %-10s %-20s %-20s %-15s", + r.Name(), shell.FormatDuration(dur), curname, + lastTag, target, + master, user, r.State()) return header } +func ReleaseReportHeader() string { + return fmt.Sprintf("%-35s %5s %-10s %-10s %-10s %-20s %-20s %-15s", + "REPO", "AGE", "CUR BR", + "LAST", "TARGET", + "MASTER", "USER", + "STATE") +} + func (v *RepoList) PrintReleaseReport(w http.ResponseWriter, readonly string, perfect string) { var count int - header := fmt.Sprintf("%-35s %5s %-10s %-10s %-10s %-10s %-20s %-15s", - "REPO", "AGE", "CUR BR", - "LAST", "MASTER", "TARGET", "USER", - "STATE") - msg(w, header) + msg(w, ReleaseReportHeader()) loop := v.ReposSortByName() for loop.Scan() { diff --git a/scanIterator.go b/scanIterator.go index b021195..c0397eb 100644 --- a/scanIterator.go +++ b/scanIterator.go @@ -97,6 +97,9 @@ func (r *RepoList) selectRepoAll() []*RepoRow { if !repo.Status.InitOk { continue } + if repo.Status.Whitelist { + continue + } repoPointers = append(repoPointers, repo) // Copy pointers for safe iteration }