go-clone/work.go

21 lines
459 B
Go
Raw Permalink Normal View History

2024-12-15 08:45:44 -06:00
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("")
}