func export support
支持快捷函数导出。
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package gtools
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os/exec"
|
||||
|
||||
"github.com/xxjwxc/gormt/data/view/model"
|
||||
|
||||
"github.com/xxjwxc/gormt/data/config"
|
||||
@@ -28,12 +31,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))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user