try to debian package

This commit is contained in:
Jeff Carr 2024-11-07 03:41:26 -06:00
parent 42db232c6a
commit 7244a636a5
1 changed files with 10 additions and 16 deletions

View File

@ -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))
}