add goimports
goimports support.
This commit is contained in:
@@ -29,6 +29,12 @@ func Execute() {
|
|||||||
tools.WriteFile(path,
|
tools.WriteFile(path,
|
||||||
[]string{str}, true)
|
[]string{str}, true)
|
||||||
|
|
||||||
cmd, _ := exec.Command("gofmt", "-l", "-w", path).Output()
|
fmt.Println("formatting differs from goimport's:")
|
||||||
|
cmd, _ := exec.Command("goimports", "-l", "-w", path).Output()
|
||||||
fmt.Println(string(cmd))
|
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