summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/main.go b/main.go
index 286995d..f0a6280 100644
--- a/main.go
+++ b/main.go
@@ -27,6 +27,7 @@ type repo struct {
bLabel *gui.Node // branch label
lastLabel *gui.Node // last tagged version label
vLabel *gui.Node // version label
+ tagsDrop *gui.Node // list of all tags
sLabel *gui.Node // git state (dirty or not?)
cButton *gui.Node // commit button
@@ -70,6 +71,9 @@ func (r *repo) scan() {
r.lastLabel.SetText(out)
r.tags = listFiles(fullpath(r.path + "/.git/refs/tags"))
+ for _, tag := range r.tags {
+ r.tagsDrop.AddText(tag)
+ }
// cmd := "dig +noall +answer www.wit.com A"
// out = shell.Run(cmd)
@@ -89,6 +93,7 @@ func addRepo(grid *gui.Node, path string) *repo {
newRepo.pLabel = grid.NewLabel(path)
newRepo.bLabel = grid.NewLabel("")
newRepo.lastLabel = grid.NewLabel("")
+ newRepo.tagsDrop = grid.NewDropdown("tags")
newRepo.vLabel = grid.NewLabel("")
newRepo.sLabel = grid.NewLabel("")
@@ -109,11 +114,12 @@ func helloworld() {
box := win.Box().NewBox("bw vbox", false)
group := box.NewGroup("test")
- grid := group.NewGrid("test", 7, 1)
+ grid := group.NewGrid("test", 8, 1)
grid.NewLabel("go repo")
grid.NewLabel("branch")
grid.NewLabel("last tag")
+ grid.NewLabel("tags")
grid.NewLabel("Version")
grid.NewLabel("is dirty?")
grid.NewLabel("commit")