diff options
Diffstat (limited to 'exit.go')
| -rw-r--r-- | exit.go | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -0,0 +1,24 @@ +package main + +import ( + "os" + + "go.wit.com/lib/protobuf/gitpb" + "go.wit.com/log" +) + +func okExit(check *gitpb.Repo, msg string) { + log.Info("exit() go-mod-clean on", check.GetGoPath(), "ok") + log.DaemonMode(true) + log.Info(msg) + os.Exit(0) +} + +func badExit(check *gitpb.Repo, err error) { + log.DaemonMode(true) + log.Info("go-mod-clean failed: ", err, forge.GetGoSrc()) + if check != nil { + eraseGoMod(check) + } + os.Exit(-1) +} |
