summaryrefslogtreecommitdiff
path: root/draw.go
diff options
context:
space:
mode:
Diffstat (limited to 'draw.go')
-rw-r--r--draw.go28
1 files changed, 8 insertions, 20 deletions
diff --git a/draw.go b/draw.go
index 9700520..cbad66b 100644
--- a/draw.go
+++ b/draw.go
@@ -11,13 +11,13 @@ import (
// creates the actual widgets.
// it's assumed you are always passing in a box
-func (rs *RepoStatus) draw(goSrcPath string, realPath string) {
+func (rs *RepoStatus) draw() {
if !rs.Ready() {
return
}
// display the status of the git repository
- rs.drawGitStatus(goSrcPath, realPath)
+ rs.drawGitStatus()
// display the git branches and options
rs.drawGitBranches()
@@ -107,30 +107,21 @@ func (rs *RepoStatus) drawGitBranches() {
log.Log(WARN, " ", name, "remote:", branch.remote, "merge", branch.merge)
}
})
- newgrid.NewButton("check go.sum", func() {
- if rs.ReadGoMod() {
- log.Log(INFO, "parsed go.mod", rs.realPath.String())
- } else {
- log.Log(WARN, "Something went wrong parsing go.mod", rs.realPath.String())
- }
-
- log.Log(WARN, "go.sum:", rs.realPath.String())
- for depname, version := range rs.goConfig {
- log.Log(WARN, " ", depname, version)
- }
+ newgrid.NewButton("check go.sum", func() {
+ rs.CheckGoSum()
})
}
-func (rs *RepoStatus) drawGitStatus(goSrcPath string, realPath string) {
+func (rs *RepoStatus) drawGitStatus() {
rs.gitStatusGroup = rs.window.Box().NewGroup("What GO Knows It Has")
newgrid := rs.gitStatusGroup.NewGrid("gridnuts", 2, 2)
newgrid.Margin()
newgrid.Pad()
rs.path = gadgets.NewOneLiner(newgrid, "path")
- rs.goSrcPath = gadgets.NewOneLiner(newgrid, goSrcPath)
- rs.realPath = gadgets.NewOneLiner(newgrid, realPath)
+ rs.goSrcPath = gadgets.NewOneLiner(newgrid, "~/go/src")
+ rs.realPath = gadgets.NewOneLiner(newgrid, "full path")
rs.realPath.Hide()
rs.mainWorkingName = gadgets.NewOneLiner(newgrid, "main working branch")
rs.mainWorkingName.SetValue("???")
@@ -149,11 +140,8 @@ func (rs *RepoStatus) drawGitStatus(goSrcPath string, realPath string) {
rs.tagsDrop.AddText(line)
}
- // rs.masterBranchVersion = gadgets.NewOneLiner(newgrid, "master")
- // rs.develBranchVersion = gadgets.NewOneLiner(newgrid, "devel")
- // rs.userBranchVersion = gadgets.NewOneLiner(newgrid, "user")
-
rs.dirtyLabel = gadgets.NewOneLiner(newgrid, "dirty")
+ rs.readOnly = gadgets.NewOneLiner(newgrid, "read only")
rs.speed = gadgets.NewOneLiner(newgrid, "refresh speed =")
rs.speedActual = gadgets.NewOneLiner(newgrid, "speed actual =")