day day up

This commit is contained in:
谢小军
2020-01-08 20:21:30 +08:00
parent 0a32dfe0e3
commit 204164e8b9
9 changed files with 90 additions and 20 deletions

View File

@@ -1,9 +1,6 @@
package gtools
import (
"fmt"
"os/exec"
"github.com/xxjwxc/gormt/data/view/model"
"github.com/xxjwxc/gormt/data/config"
@@ -31,12 +28,12 @@ func Execute() {
path := config.GetOutDir() + "/" + v.FileName
tools.WriteFile(path, []string{v.FileCtx}, true)
fmt.Println("formatting differs from goimport's:")
cmd, _ := exec.Command("goimports", "-l", "-w", path).Output()
fmt.Println(string(cmd))
// fmt.Println("formatting differs from goimport's:")
// cmd, _ := exec.Command("goimports", "-l", "-w", path).Output()
// fmt.Println(string(cmd))
fmt.Println("formatting differs from gofmt's:")
cmd, _ = exec.Command("gofmt", "-l", "-w", path).Output()
fmt.Println(string(cmd))
// fmt.Println("formatting differs from gofmt's:")
// cmd, _ = exec.Command("gofmt", "-l", "-w", path).Output()
// fmt.Println(string(cmd))
}
}