summaryrefslogtreecommitdiff
path: root/repolist.go
diff options
context:
space:
mode:
Diffstat (limited to 'repolist.go')
-rw-r--r--repolist.go35
1 files changed, 20 insertions, 15 deletions
diff --git a/repolist.go b/repolist.go
index bf27bb5..54ae60e 100644
--- a/repolist.go
+++ b/repolist.go
@@ -17,9 +17,11 @@ func (r *repo) String() string {
return r.status.String()
}
+/*
func (r *repo) getPath() string {
return r.path
}
+*/
func RemoveFirstElement(slice []string) (string, []string) {
if len(slice) == 0 {
@@ -92,24 +94,27 @@ func addRepo(grid *gui.Node, path string, master string, devel string, user stri
log.Info("addRepo() already had path", path)
return
}
- log.Info("addRepo() attempting to add path", path)
+ // log.Info("addRepo() attempting to add path", path)
newRepo := new(repo)
- path = strings.Trim(path, "/") // trim any extranous '/' chars put in the config file by the user
+ path = strings.TrimSuffix(path, "/") // trim any extranous '/' chars put in the config file by the user
if path == "" {
- log.Warn("addRepo() got empty path", path, master, devel, user)
+ // just an empty line in the config file
return
}
- if repostatus.VerifyLocalGoRepo(path) {
- log.Verbose("newRepo actually exists", newRepo.getPath())
+ if strings.HasPrefix(path, "/") {
+ // this is a direct path. don't check if it is a golang repo
} else {
- log.Warn("repostatus.VerifyLocalGoRepo() failed for for", path, master, devel, user)
- return
+ if repostatus.VerifyLocalGoRepo(path) {
+ // log.Verbose("newRepo actually exists", )
+ } else {
+ // log.Warn("repostatus.VerifyLocalGoRepo() failed for for", path, master, devel, user)
+ return
+ }
}
- newRepo.path = path
newRepo.pLabel = grid.NewLabel(path).SetProgName("path")
newRepo.lastTag = grid.NewLabel("").SetProgName("lastTag")
@@ -157,7 +162,7 @@ func addRepo(grid *gui.Node, path string, master string, devel string, user stri
me.reposwin.Enable()
})
- newRepo.status = repostatus.NewRepoStatusWindow(newRepo.path)
+ newRepo.status = repostatus.NewRepoStatusWindow(path)
newRepo.hidden = false
newRepo.status.SetMainWorkingName(master)
newRepo.status.SetDevelWorkingName(devel)
@@ -166,12 +171,12 @@ func addRepo(grid *gui.Node, path string, master string, devel string, user stri
var showBuildB bool = false
switch newRepo.status.RepoType() {
case "binary":
- log.Info("compile here. Show()")
+ // log.Info("compile here. Show()")
showBuildB = true
case "library":
- log.Info("library here. Hide()")
+ // log.Info("library here. Hide()")
default:
- log.Info("unknown. Show()")
+ log.Info("unknown RepoType", newRepo.status.RepoType())
}
if showBuildB {
newRepo.endBox.NewButton("build", func() {
@@ -250,13 +255,13 @@ func showApps() {
for _, repo := range me.allrepos {
switch repo.status.RepoType() {
case "binary":
- log.Info("compile here. Show()")
+ //log.Info("compile here. Show()")
repo.Show()
case "library":
- log.Info("library here. Hide()")
+ //log.Info("library here. Hide()")
repo.Hide()
default:
- log.Info("unknown. Show()")
+ log.Info("showApps() unknown. Show()")
repo.Hide()
}