blob: 2983aae178cc47c4bd43268b300886b12764b0e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  | 
package main
import (
	"go.wit.com/lib/ENV"
	"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", ENV.Get("gopath")+"/go.work")
	shell.PathRun(ENV.Get("gopath"), []string{"mv", "go.work", "go.work.last"})
	me.forge.MakeGoWork()
	shell.PathRun(ENV.Get("gopath"), []string{"go", "work", "use"})
	log.Info("")
	log.Info("original go.work file saved as go.work.last")
	log.Info("")
}
  |