summaryrefslogtreecommitdiff
path: root/initRepoList.go
blob: be01f1a82a8e51d484e7a70042e094b638fab470 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package main

// this initializes the repos

import (
	"strings"

	"go.wit.com/lib/gui/repostatus"
	"go.wit.com/log"
)

func (r *repoWindow) initRepoList() {
	r.View.InitRepoList(".config/guireleaser")

	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)
		r.View.NewRepo(path)
	}
}

func (r *repoWindow) tmpRepoList() {

	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)
		r.View.NewRepo(path)
	}
}