summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-11-07 03:41:26 -0600
committerJeff Carr <[email protected]>2024-11-07 03:41:26 -0600
commit7244a636a5fa491d01fee5fac91fd2d1d1623856 (patch)
tree93c943e1a0afcdbda2df9f4e6d5185f6b4f3ed58
parent42db232c6acc9712517e2802a8c0161e2374ab1c (diff)
try to debian packagev0.22.9
-rw-r--r--human.go26
1 files changed, 10 insertions, 16 deletions
diff --git a/human.go b/human.go
index 79c218b..d816d71 100644
--- a/human.go
+++ b/human.go
@@ -31,12 +31,6 @@ func (r *RepoRow) StandardHeader() string {
return header
}
-// send stuff to the socket and stdout
-func msg(w http.ResponseWriter, s string) {
- log.Info(s)
- fmt.Fprintln(w, s)
-}
-
func ReportHeader() string {
return fmt.Sprintf("%-35s %5s %-10s %-10s %-20s %-20s %-20s %-15s",
"REPO", "AGE",
@@ -48,7 +42,7 @@ func ReportHeader() string {
func (v *RepoList) PrintReport(w http.ResponseWriter, readonly string, onlydirty string, perfect string) {
var count int
- msg(w, ReportHeader())
+ log.Info(ReportHeader())
loop := v.ReposSortByName()
for loop.Scan() {
@@ -58,14 +52,14 @@ func (v *RepoList) PrintReport(w http.ResponseWriter, readonly string, onlydirty
header := repo.StandardHeader()
if onlydirty == "true" {
if repo.CheckDirty() {
- msg(w, header+"")
+ log.Info(header+"")
}
continue
}
if repo.ReadOnly() {
if readonly == "true" {
- msg(w, header+"readonly")
+ log.Info(header+"readonly")
}
continue
}
@@ -75,16 +69,16 @@ func (v *RepoList) PrintReport(w http.ResponseWriter, readonly string, onlydirty
}
}
if repo.State() != "merge to main" {
- msg(w, header+"")
+ log.Info(header+"")
continue
}
if repo.CheckDirty() {
- msg(w, header+"")
+ log.Info(header+"")
continue
}
- msg(w, header+"")
+ log.Info(header+"")
}
- msg(w, fmt.Sprintf("EVERYTHING WORKED repo count = %d", count))
+ log.Info(fmt.Sprintf("EVERYTHING WORKED repo count = %d", count))
}
// makes a human readable thing for standard out.
@@ -118,7 +112,7 @@ func ReleaseReportHeader() string {
func (v *RepoList) PrintReleaseReport(w http.ResponseWriter, readonly string, perfect string) {
var count int
- msg(w, ReleaseReportHeader())
+ log.Info(ReleaseReportHeader())
loop := v.ReposSortByName()
for loop.Scan() {
@@ -135,7 +129,7 @@ func (v *RepoList) PrintReleaseReport(w http.ResponseWriter, readonly string, pe
}
count += 1
header := repo.StandardReleaseHeader()
- msg(w, header)
+ log.Info(header)
}
- msg(w, fmt.Sprintf("total repo count = %d", count))
+ log.Info(fmt.Sprintf("total repo count = %d", count))
}