autotypist/initRepoList.go

28 lines
568 B
Go
Raw Normal View History

2024-02-18 07:24:56 -06:00
package main
// this initializes the repos
import (
"strings"
"go.wit.com/lib/gui/repostatus"
"go.wit.com/log"
)
func (r *repoWindow) initRepoList() {
2024-02-22 21:10:01 -06:00
r.View.InitRepoList("~/.config/autotypist")
2024-02-18 07:24:56 -06:00
if args.OnlyMe {
log.Info("not scanning everything")
} else {
log.Info("scanning everything in ~/go/src")
for i, path := range repostatus.ListGitDirectories() {
// log.Info("addRepo()", i, path)
path = strings.TrimPrefix(path, me.goSrcPwd.String())
path = strings.Trim(path, "/")
log.Info("addRepo()", i, path)
2024-02-22 19:04:02 -06:00
r.View.NewRepo(path)
2024-02-18 07:24:56 -06:00
}
}
}