remove defer clean(), disable go mod tidy in defer

This commit is contained in:
WuErPing 2020-10-27 16:44:31 +08:00
parent 0273362499
commit 498b7fc17a
1 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,7 @@ import (
) )
func main() { func main() {
clean := func() { clean := func() {
c := exec.Command("go", "mod", "tidy") c := exec.Command("go", "mod", "tidy")
c.Stdout = os.Stdout c.Stdout = os.Stdout
@ -16,7 +17,6 @@ func main() {
c.Stdin = os.Stdin c.Stdin = os.Stdin
c.Run() c.Run()
} }
defer clean()
defer func() { defer func() {
if err := recover(); err != nil { if err := recover(); err != nil {
@ -29,6 +29,7 @@ func main() {
clean() clean()
log.Fatal(err) log.Fatal(err)
} }
} }
func run() error { func run() error {