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 { if argv.Strict { // if in strict mode, remove the go.mod and go.sum eraseGoMod(check) } } os.Exit(-1) }