all: formatting (#93)

Enforce stricter formatting and import grouping with gofumports.
This commit is contained in:
Michael McLoughlin
2019-07-30 18:40:47 -07:00
committed by GitHub
parent d43efabdbe
commit bb615f61ce
11 changed files with 34 additions and 5 deletions

View File

@@ -27,6 +27,7 @@ func (c *ctors) Generate(is []inst.Instruction) ([]byte, error) {
c.Printf("package x86\n\n")
c.Printf("import (\n")
c.Printf("\t\"errors\"\n")
c.NL()
c.Printf("\tintrep \"%s/ir\"\n", pkg)
c.Printf("\t\"%s/reg\"\n", pkg)
c.Printf("\t\"%s/operand\"\n", pkg)

View File

@@ -25,6 +25,7 @@ func (c *ctorstest) Generate(is []inst.Instruction) ([]byte, error) {
c.Printf("import (\n")
c.Printf("\t\"testing\"\n")
c.Printf("\t\"math\"\n")
c.NL()
c.Printf("\t\"%s/reg\"\n", pkg)
c.Printf("\t\"%s/operand\"\n", pkg)
c.Printf(")\n\n")

View File

@@ -3,7 +3,7 @@ package gen
import "testing"
func TestBuilderInterfaces(t *testing.T) {
var _ = []Builder{
_ = []Builder{
NewAsmTest,
NewGoData,
NewGoDataTest,

View File

@@ -28,6 +28,7 @@ func (m *mov) Generate(is []inst.Instruction) ([]byte, error) {
m.Printf("import (\n")
m.Printf("\t\"go/types\"\n")
m.NL()
m.Printf("\t\"%s/operand\"\n", pkg)
m.Printf(")\n\n")