blob: 4e87fd24fc37d71b7f9ad3dc86ccacbb6de652ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
  | 
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)
}
  |