package main import ( "fmt" "path/filepath" "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.Namespace, "ok") log.DaemonMode(true) me.argv.GoodExit(msg) } func badExit(check *gitpb.Repo, err error) { log.DaemonMode(true) if check != nil { if argv.Strict != nil { // if in strict mode, remove the go.mod and go.sum eraseGoMod(check) } } fullpath := filepath.Join(check.FullPath) s := fmt.Sprintf("failed in %s", fullpath) me.argv.BadExit(s, err) }