summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-20 18:55:50 -0600
committerJeff Carr <[email protected]>2024-02-20 18:55:50 -0600
commit81a1801223dd7b0c55375ea92cef3993c2f6ec59 (patch)
tree28b12c8c5a66be3576d45ca4ba4551a80db675cb
parent1fe0354822f471d035a5d8c42af868624a8bb9ff (diff)
add button for checking go.sumv0.20.8
-rw-r--r--addRepo.go28
-rw-r--r--flags.go2
-rw-r--r--goConfig.go2
-rw-r--r--structs.go2
4 files changed, 15 insertions, 19 deletions
diff --git a/addRepo.go b/addRepo.go
index 007ecc8..8242ab0 100644
--- a/addRepo.go
+++ b/addRepo.go
@@ -183,22 +183,18 @@ func (r *RepoList) addRepo(grid *gui.Node, path string, master string, devel str
}
newRepo.Status.Toggle()
})
-
- var showBuildB bool = false
- switch newRepo.Status.RepoType() {
- case "binary":
- // log.Info("compile here. Show()")
- showBuildB = true
- case "library":
- // log.Info("library here. Hide()")
- default:
- // log.Info("unknown RepoType", newRepo.Status.RepoType())
- }
- if showBuildB {
- newRepo.endBox.NewButton("build", func() {
- newRepo.Status.Build()
- })
- }
+ newRepo.endBox.NewButton("CheckValidGoSum()", func() {
+ ok, err := r.CheckValidGoSum(newRepo)
+ if err != nil {
+ log.Info("go mod tidy did not work err =", err)
+ return
+ }
+ if ok {
+ log.Info("repo has go.sum requirements that are clean")
+ newRepo.goState.SetText("GOOD")
+ return
+ }
+ })
default:
}
grid.NextRow()
diff --git a/flags.go b/flags.go
index 86b2652..f4893e5 100644
--- a/flags.go
+++ b/flags.go
@@ -16,5 +16,5 @@ func init() {
short := "repo"
REPO = log.NewFlag("REPO", false, full, short, "general repo things")
- REPOWARN = log.NewFlag("REPOWARN", true, full, short, "general repo things")
+ REPOWARN = log.NewFlag("REPOWARN", true, full, short, "repo warnings")
}
diff --git a/goConfig.go b/goConfig.go
index 191d667..18b8332 100644
--- a/goConfig.go
+++ b/goConfig.go
@@ -15,7 +15,7 @@ func (rl *RepoList) CheckValidGoSum(r *Repo) (bool, error) {
log.Log(REPOWARN, "CheckValidGoSum() started")
ok, err := r.Status.MakeRedomod()
if !ok {
- log.Log(REPOWARN, "CheckValidGoSum() failed", err)
+ log.Log(REPOWARN, "CheckValidGoSum() MakeRedomod() failed", err)
return ok, err
}
diff --git a/structs.go b/structs.go
index 19ffada..e0f60e8 100644
--- a/structs.go
+++ b/structs.go
@@ -33,7 +33,7 @@ type RepoList struct {
shownCount *gui.Node
hideFunction func(*Repo)
- duration *gui.Node
+ duration *gui.Node
}
type Repo struct {