add Total() and TotalGo()

This commit is contained in:
Jeff Carr 2024-02-21 11:17:54 -06:00
parent f24cbf8487
commit abd6ace49e
1 changed files with 14 additions and 0 deletions

View File

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