try to debian package
This commit is contained in:
parent
42db232c6a
commit
7244a636a5
26
human.go
26
human.go
|
@ -31,12 +31,6 @@ func (r *RepoRow) StandardHeader() string {
|
||||||
return header
|
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 {
|
func ReportHeader() string {
|
||||||
return fmt.Sprintf("%-35s %5s %-10s %-10s %-20s %-20s %-20s %-15s",
|
return fmt.Sprintf("%-35s %5s %-10s %-10s %-20s %-20s %-20s %-15s",
|
||||||
"REPO", "AGE",
|
"REPO", "AGE",
|
||||||
|
@ -48,7 +42,7 @@ func ReportHeader() string {
|
||||||
func (v *RepoList) PrintReport(w http.ResponseWriter, readonly string, onlydirty string, perfect string) {
|
func (v *RepoList) PrintReport(w http.ResponseWriter, readonly string, onlydirty string, perfect string) {
|
||||||
var count int
|
var count int
|
||||||
|
|
||||||
msg(w, ReportHeader())
|
log.Info(ReportHeader())
|
||||||
|
|
||||||
loop := v.ReposSortByName()
|
loop := v.ReposSortByName()
|
||||||
for loop.Scan() {
|
for loop.Scan() {
|
||||||
|
@ -58,14 +52,14 @@ func (v *RepoList) PrintReport(w http.ResponseWriter, readonly string, onlydirty
|
||||||
header := repo.StandardHeader()
|
header := repo.StandardHeader()
|
||||||
if onlydirty == "true" {
|
if onlydirty == "true" {
|
||||||
if repo.CheckDirty() {
|
if repo.CheckDirty() {
|
||||||
msg(w, header+"")
|
log.Info(header+"")
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if repo.ReadOnly() {
|
if repo.ReadOnly() {
|
||||||
if readonly == "true" {
|
if readonly == "true" {
|
||||||
msg(w, header+"readonly")
|
log.Info(header+"readonly")
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
@ -75,16 +69,16 @@ func (v *RepoList) PrintReport(w http.ResponseWriter, readonly string, onlydirty
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if repo.State() != "merge to main" {
|
if repo.State() != "merge to main" {
|
||||||
msg(w, header+"")
|
log.Info(header+"")
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if repo.CheckDirty() {
|
if repo.CheckDirty() {
|
||||||
msg(w, header+"")
|
log.Info(header+"")
|
||||||
continue
|
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.
|
// 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) {
|
func (v *RepoList) PrintReleaseReport(w http.ResponseWriter, readonly string, perfect string) {
|
||||||
var count int
|
var count int
|
||||||
|
|
||||||
msg(w, ReleaseReportHeader())
|
log.Info(ReleaseReportHeader())
|
||||||
|
|
||||||
loop := v.ReposSortByName()
|
loop := v.ReposSortByName()
|
||||||
for loop.Scan() {
|
for loop.Scan() {
|
||||||
|
@ -135,7 +129,7 @@ func (v *RepoList) PrintReleaseReport(w http.ResponseWriter, readonly string, pe
|
||||||
}
|
}
|
||||||
count += 1
|
count += 1
|
||||||
header := repo.StandardReleaseHeader()
|
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))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue