diff options
| author | Jeff Carr <[email protected]> | 2024-12-13 16:16:18 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-13 16:16:18 -0600 |
| commit | 8c68cff7624dd797533122509a7d86ed316090c5 (patch) | |
| tree | 5cae23d1f096a619180533c24f19380970cca121 /exit.go | |
| parent | 02bbd75ce1d80f845673c30a004e35f9ce491ab6 (diff) | |
don't work on non-master branches
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) +} |
