diff --git a/common.go b/common.go index cf7e463..717cc89 100644 --- a/common.go +++ b/common.go @@ -160,3 +160,17 @@ func (rl *RepoList) MirrorShownCount() *gui.Node { func (rl *RepoList) MirrorScanDuration() *gui.Node { return gui.RawMirror(rl.duration) } + +func (rl *RepoList) Total() int { + return len(me.allrepos) +} + +func (rl *RepoList) TotalGo() int { + var count int + for _, repo := range me.allrepos { + if repo.Status.IsGoLang() { + count += 1 + } + } + return count +}