diff options
| author | Jeff Carr <[email protected]> | 2024-02-16 17:55:53 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-02-16 17:55:53 -0600 |
| commit | c253a30fb61cdc956e1cefb8296e34bf74ddf90c (patch) | |
| tree | fc4b962a2e768866619acce615deaa99fd56dde9 /pkgsite.go | |
| parent | bdb761714361a3986834b8b50bb34cce45d01e4d (diff) | |
changing branches works
Diffstat (limited to 'pkgsite.go')
| -rw-r--r-- | pkgsite.go | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/pkgsite.go b/pkgsite.go deleted file mode 100644 index db61518..0000000 --- a/pkgsite.go +++ /dev/null @@ -1,59 +0,0 @@ -package main - -import ( - "fmt" - "os" - "path/filepath" - - "go.wit.com/gui" - "go.wit.com/lib/gui/shell" - "go.wit.com/log" -) - -func docsBox(vbox *gui.Node) { - group := vbox.NewGroup("Docs") - - group.NewButton("make 'go.work' file", func() { - me.autotypistWindow.Disable() - - goSrcDir := me.goSrcPwd.String() - filename := filepath.Join(goSrcDir, "go.work") - - f, err := os.OpenFile(filename, os.O_WRONLY|os.O_CREATE, 0600) - if err != nil { - return - } - defer f.Close() - fmt.Fprintln(f, "go 1.21.4") - fmt.Fprintln(f, "") - fmt.Fprintln(f, "use (") - for _, repo := range me.allrepos { - if repo.status.Exists("go.mod") { - fmt.Fprintln(f, "\t"+repo.String()) - } else { - log.Info("missing go.mod for", repo.String()) - repo.status.MakeRedomod() - } - } - fmt.Fprintln(f, ")") - - me.autotypistWindow.Enable() - }) - - group.NewButton("run pkgsite", func() { - tmp := me.userHomePwd.String() - tmpDir := filepath.Join(tmp, "go/src") - os.Chdir(tmpDir) - pkgsite := filepath.Join(tmp, "go/bin", "pkgsite") - os.Unsetenv("GO111MODULE") - go shell.Run([]string{pkgsite}) - shell.Run([]string{"ping", "-c", "3", "git.wit.org"}) - }) - - group.NewButton("send docs to browser (localhost:8080)", func() { - me.autotypistWindow.Disable() - defer me.autotypistWindow.Enable() - - shell.OpenBrowser("http://localhost:8080") - }) -} |
