use 'go vet' instead of 'go build'
This commit is contained in:
parent
a57e9cff06
commit
18a9a078e0
3
Makefile
3
Makefile
|
@ -1,5 +1,6 @@
|
||||||
all:
|
all:
|
||||||
@GO111MODULE=off go build
|
@#GO111MODULE=off go build
|
||||||
|
@GO111MODULE=off go vet -x
|
||||||
@echo this go library package builds okay
|
@echo this go library package builds okay
|
||||||
|
|
||||||
goimports:
|
goimports:
|
||||||
|
|
7
scan.go
7
scan.go
|
@ -33,18 +33,17 @@ func (r *RepoList) ScanRepositories() (int, string) {
|
||||||
})
|
})
|
||||||
s := fmt.Sprint(t)
|
s := fmt.Sprint(t)
|
||||||
tmp := strconv.Itoa(shown) + " repos shown"
|
tmp := strconv.Itoa(shown) + " repos shown"
|
||||||
log.Info("Setting shownCount to", tmp)
|
|
||||||
me.shownCount.SetText(tmp)
|
me.shownCount.SetText(tmp)
|
||||||
me.duration.SetText(s)
|
me.duration.SetText(s)
|
||||||
|
|
||||||
log.Info("Scanned", i, "repositories.", total, "changes in", s)
|
log.Log(REPOWARN, "Scanned", i, "repositories.", total, "changes in", s)
|
||||||
return i, s
|
return i, s
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *RepoRow) NewScan() int {
|
func (r *RepoRow) NewScan() int {
|
||||||
var changed int = 0
|
var changed int = 0
|
||||||
if r.Status == nil {
|
if r.Status == nil {
|
||||||
log.Warn("repo.Status = nil. not initialized for some reason")
|
log.Log(REPOWARN, "repo.Status = nil. not initialized for some reason")
|
||||||
return changed
|
return changed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +63,7 @@ func (r *RepoRow) NewScan() int {
|
||||||
log.Log(REPOWARN, "something finally changed")
|
log.Log(REPOWARN, "something finally changed")
|
||||||
c := strings.TrimSpace(c)
|
c := strings.TrimSpace(c)
|
||||||
for _, line := range strings.Split(c, "\n") {
|
for _, line := range strings.Split(c, "\n") {
|
||||||
log.Info(r.Status.Path(), line)
|
log.Log(REPOWARN, r.Status.Path(), line)
|
||||||
changed += 1
|
changed += 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ func (r *RepoList) Watchdog(f func()) {
|
||||||
}
|
}
|
||||||
// print every 'delay' seconds
|
// print every 'delay' seconds
|
||||||
if i%delay == 0 {
|
if i%delay == 0 {
|
||||||
log.Info("Not auto scanning", i, "REPO_AUTO_SCAN =", os.Getenv("REPO_AUTO_SCAN"))
|
log.Log(REPOWARN, "Not auto scanning", i, "REPO_AUTO_SCAN =", os.Getenv("REPO_AUTO_SCAN"))
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue