summaryrefslogtreecommitdiff
path: root/docs.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-21 08:32:59 -0600
committerJeff Carr <[email protected]>2024-02-21 08:32:59 -0600
commitdf0ff5af1cd92287f79c7033cde4d339e0d8b628 (patch)
tree9230b0b2cc4d4e776c0a91e50f36c6685f92a764 /docs.go
parent42c506c0982ea85d54443a39e4995c44060287df (diff)
purge code for the autotypist
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'docs.go')
-rw-r--r--docs.go60
1 files changed, 0 insertions, 60 deletions
diff --git a/docs.go b/docs.go
deleted file mode 100644
index b5baca2..0000000
--- a/docs.go
+++ /dev/null
@@ -1,60 +0,0 @@
-package main
-
-import (
- "fmt"
- "os"
- "path/filepath"
-
- "go.wit.com/gui"
- "go.wit.com/lib/gui/repolist"
- "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 repolist.AllRepos() {
- if repo.Exists("go.mod") {
- fmt.Fprintln(f, "\t"+repo.Status.GoPath())
- } else {
- log.Info("missing go.mod for", repo.Status.Path())
- 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("open docs in browser (localhost:8080)", func() {
- me.autotypistWindow.Disable()
- defer me.autotypistWindow.Enable()
-
- shell.OpenBrowser("http://localhost:8080")
- })
-}