summaryrefslogtreecommitdiff
path: root/work.go
diff options
context:
space:
mode:
Diffstat (limited to 'work.go')
-rw-r--r--work.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/work.go b/work.go
new file mode 100644
index 0000000..6b56094
--- /dev/null
+++ b/work.go
@@ -0,0 +1,20 @@
+package main
+
+import (
+ "go.wit.com/lib/gui/shell"
+ "go.wit.com/log"
+)
+
+func autoWork() {
+ // remake the go.work file
+ if !argv.AutoWork {
+ return
+ }
+ log.Info("About to re-create", forge.GetGoSrc()+"/go.work")
+ shell.PathRun(forge.GetGoSrc(), []string{"mv", "go.work", "go.work.last"})
+ forge.MakeGoWork()
+ shell.PathRun(forge.GetGoSrc(), []string{"go", "work", "use"})
+ log.Info("")
+ log.Info("original go.work file saved as go.work.last")
+ log.Info("")
+}