gofmt autofix paths

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-01-18 00:58:14 -06:00
parent a2c47263e3
commit 8a80991bd5
8 changed files with 71 additions and 65 deletions

View File

@ -8,7 +8,7 @@ import (
"go.wit.com/log" "go.wit.com/log"
"go.wit.com/gui/gui" "go.wit.com/gui/gui"
"go.wit.com/gui/gadgets" "go.wit.com/lib/gadgets"
) )
func doesExist(path string) bool { func doesExist(path string) bool {

View File

@ -1,11 +1,10 @@
package main package main
import ( import (
"go.wit.com/log"
"go.wit.com/gui/gui" "go.wit.com/gui/gui"
"go.wit.com/log"
) )
func globalResetOptions(box *gui.Node) { func globalResetOptions(box *gui.Node) {
group2 := box.NewGroup("Global Destructive Options") group2 := box.NewGroup("Global Destructive Options")
buildOptions := group2.NewGrid("buildOptions", 2, 1) buildOptions := group2.NewGrid("buildOptions", 2, 1)

21
main.go
View File

@ -2,14 +2,14 @@
package main package main
import ( import (
"os/user"
"embed" "embed"
"os/user"
"go.wit.com/log" "go.wit.com/log"
"go.wit.com/gui/gui" "go.wit.com/gui/gui"
"go.wit.com/gui/gadgets" "go.wit.com/lib/gadgets"
"go.wit.com/gui/lib/repostatus" "go.wit.com/lib/gui/repostatus"
) )
//go:embed resources/* //go:embed resources/*
@ -97,6 +97,8 @@ func repoworld() {
reposwin.Make() reposwin.Make()
reposbox = reposwin.Box().NewBox("bw vbox", false) reposbox = reposwin.Box().NewBox("bw vbox", false)
reposwin.Draw()
reposgroup = reposbox.NewGroup("go repositories (read from ~/.config/myrepolist)") reposgroup = reposbox.NewGroup("go repositories (read from ~/.config/myrepolist)")
reposgrid = reposgroup.NewGrid("test", 11, 1) reposgrid = reposgroup.NewGrid("test", 11, 1)
@ -116,11 +118,16 @@ func repoworld() {
for _, line := range repos { for _, line := range repos {
log.Warn("repo =", line) log.Warn("repo =", line)
path, mbranch, dbranch, ubranch := splitLine(line) path, mbranch, dbranch, ubranch := splitLine(line)
if mbranch == "" { mbranch = "master" } if mbranch == "" {
if dbranch == "" { dbranch = "devel" } mbranch = "master"
}
if dbranch == "" {
dbranch = "devel"
}
usr, _ := user.Current() usr, _ := user.Current()
if ubranch == "" { ubranch = usr.Username } if ubranch == "" {
ubranch = usr.Username
}
addRepo(reposgrid, path, mbranch, dbranch, ubranch) addRepo(reposgrid, path, mbranch, dbranch, ubranch)
} }
reposwin.Draw()
} }

View File

@ -4,7 +4,7 @@ package main
import ( import (
"go.wit.com/log" "go.wit.com/log"
"go.wit.com/gui/lib/repostatus" "go.wit.com/lib/gui/repostatus"
) )
func (r *repo) newScan() bool { func (r *repo) newScan() bool {

View File

@ -3,8 +3,8 @@ package main
import ( import (
"go.wit.com/gui/gui" "go.wit.com/gui/gui"
"go.wit.com/gui/gadgets" "go.wit.com/lib/gadgets"
"go.wit.com/gui/lib/repostatus" "go.wit.com/lib/gui/repostatus"
) )
// the main window nodes // the main window nodes

View File

@ -1,10 +1,10 @@
package main package main
import ( import (
"strings"
"go.wit.com/log" "go.wit.com/log"
"strings"
"go.wit.com/gui/lib/repostatus" "go.wit.com/lib/gui/repostatus"
) )
var repopath string = "/home/jcarr/" var repopath string = "/home/jcarr/"