all: apply gofumpt (#79)

Apply @mvdan's opinionated gofumpt formatter across the codebase.
This commit is contained in:
Michael McLoughlin
2019-04-13 22:53:13 -05:00
committed by GitHub
parent d0da7e47ad
commit 1735441939
19 changed files with 18 additions and 56 deletions

View File

@@ -33,9 +33,7 @@ $ go get -u github.com/mmcloughlin/avo
package main package main
import ( import . "github.com/mmcloughlin/avo/build"
. "github.com/mmcloughlin/avo/build"
)
func main() { func main() {
TEXT("Add", NOSPLIT, "func(x, y uint64) uint64") TEXT("Add", NOSPLIT, "func(x, y uint64) uint64")

View File

@@ -10,9 +10,7 @@ The [code generator](asm.go) is as follows:
package main package main
import ( import . "github.com/mmcloughlin/avo/build"
. "github.com/mmcloughlin/avo/build"
)
func main() { func main() {
TEXT("Add", NOSPLIT, "func(x, y uint64) uint64") TEXT("Add", NOSPLIT, "func(x, y uint64) uint64")

View File

@@ -2,9 +2,7 @@
package main package main
import ( import . "github.com/mmcloughlin/avo/build"
. "github.com/mmcloughlin/avo/build"
)
func main() { func main() {
TEXT("Add", NOSPLIT, "func(x, y uint64) uint64") TEXT("Add", NOSPLIT, "func(x, y uint64) uint64")

View File

@@ -2,9 +2,7 @@
package main package main
import ( import . "github.com/mmcloughlin/avo/build"
. "github.com/mmcloughlin/avo/build"
)
func main() { func main() {
Package("github.com/mmcloughlin/avo/examples/args") Package("github.com/mmcloughlin/avo/examples/args")

View File

@@ -2,9 +2,7 @@
package main package main
import ( import . "github.com/mmcloughlin/avo/build"
. "github.com/mmcloughlin/avo/build"
)
func main() { func main() {
TEXT("Real", NOSPLIT, "func(z complex128) float64") TEXT("Real", NOSPLIT, "func(z complex128) float64")

View File

@@ -2,9 +2,7 @@
package main package main
import ( import . "github.com/mmcloughlin/avo/build"
. "github.com/mmcloughlin/avo/build"
)
func main() { func main() {
Package("github.com/mmcloughlin/avo/examples/ext") Package("github.com/mmcloughlin/avo/examples/ext")

View File

@@ -1,8 +1,6 @@
package geohash package geohash
import ( import "testing"
"testing"
)
//go:generate go run asm.go -out geohash.s -stubs stub.go //go:generate go run asm.go -out geohash.s -stubs stub.go

View File

@@ -1,8 +1,6 @@
package sha1 package sha1
import ( import "encoding/binary"
"encoding/binary"
)
// Size of a SHA-1 checksum in bytes. // Size of a SHA-1 checksum in bytes.
const Size = 20 const Size = 20

View File

@@ -28,7 +28,6 @@ func scramble64(v, prime uint64) uint64 {
} }
func SeedState(seed []uint64) State { func SeedState(seed []uint64) State {
var state State var state State
state[0] = seed[0] ^ 0x43f6a8885a308d31 state[0] = seed[0] ^ 0x43f6a8885a308d31

View File

@@ -2,9 +2,7 @@
package stadtx package stadtx
import ( import "testing"
"testing"
)
/* /*
@@ -39,7 +37,6 @@ int main()
*/ */
func TestHash(t *testing.T) { func TestHash(t *testing.T) {
var tests = []uint64{ var tests = []uint64{
0x0db6608af30c8cc1, 0xe3ffb1e1a2273589, 0xc34df40f05c3d43a, 0xf79284a93cd817cf, 0x178aed7315bcd4b9, 0x48a29a42948da116, 0xa78613b72330a064, 0xa23cd23f7b6eaef7, 0x0db6608af30c8cc1, 0xe3ffb1e1a2273589, 0xc34df40f05c3d43a, 0xf79284a93cd817cf, 0x178aed7315bcd4b9, 0x48a29a42948da116, 0xa78613b72330a064, 0xa23cd23f7b6eaef7,
0x7e4c118aca1d7886, 0x37059645f8797936, 0xcb7197e3253670cb, 0x5dadeebe5a5bc19f, 0x537057981e3f75ad, 0x41d57f7870fbcbf8, 0x7fc3cd6b1bb018c2, 0xbf98dbc2a88c5050, 0x7e4c118aca1d7886, 0x37059645f8797936, 0xcb7197e3253670cb, 0x5dadeebe5a5bc19f, 0x537057981e3f75ad, 0x41d57f7870fbcbf8, 0x7fc3cd6b1bb018c2, 0xbf98dbc2a88c5050,

View File

@@ -1,8 +1,6 @@
package load package load
import ( import "github.com/mmcloughlin/avo/internal/inst"
"github.com/mmcloughlin/avo/internal/inst"
)
// alias defines an opcode alias. // alias defines an opcode alias.
type alias struct { type alias struct {

View File

@@ -1,8 +1,6 @@
package opcodescsv package opcodescsv
import ( import "testing"
"testing"
)
func TestBuildOrderMap(t *testing.T) { func TestBuildOrderMap(t *testing.T) {
is, err := ReadFile("testdata/x86.v0.2.csv") is, err := ReadFile("testdata/x86.v0.2.csv")

View File

@@ -1,8 +1,6 @@
package opcodesxml package opcodesxml
import ( import "testing"
"testing"
)
func TestReadFile(t *testing.T) { func TestReadFile(t *testing.T) {
_, err := ReadFile("testdata/x86_64.xml") _, err := ReadFile("testdata/x86_64.xml")

View File

@@ -1,8 +1,6 @@
package operand package operand
import ( import "github.com/mmcloughlin/avo/reg"
"github.com/mmcloughlin/avo/reg"
)
// Pure type assertion checks: // Pure type assertion checks:

View File

@@ -15,9 +15,7 @@ import (
"strconv" "strconv"
) )
var ( var output = flag.String("output", "", "path to output file (default stdout)")
output = flag.String("output", "", "path to output file (default stdout)")
)
func PrintConstType(w io.Writer, name, typ, format string, size int, doc string) { func PrintConstType(w io.Writer, name, typ, format string, size int, doc string) {
r := typ[0] r := typ[0]

View File

@@ -2,9 +2,7 @@
package main package main
import ( import . "github.com/mmcloughlin/avo/build"
. "github.com/mmcloughlin/avo/build"
)
func main() { func main() {
TEXT("Split", NOSPLIT, "func(x uint64) (q uint64, l uint32, w uint16, b uint8)") TEXT("Split", NOSPLIT, "func(x uint64) (q uint64, l uint32, w uint16, b uint8)")

View File

@@ -2,9 +2,7 @@
package main package main
import ( import . "github.com/mmcloughlin/avo/build"
. "github.com/mmcloughlin/avo/build"
)
func main() { func main() {
TEXT("Issue50", NOSPLIT, "func(x uint32) uint32") TEXT("Issue50", NOSPLIT, "func(x uint32) uint32")

View File

@@ -2,9 +2,7 @@
package main package main
import ( import . "github.com/mmcloughlin/avo/build"
. "github.com/mmcloughlin/avo/build"
)
func main() { func main() {
Package("github.com/mmcloughlin/avo/tests/fixedbugs/issue62") Package("github.com/mmcloughlin/avo/tests/fixedbugs/issue62")

View File

@@ -1,8 +1,6 @@
package issue62 package issue62
import ( import "testing"
"testing"
)
//go:generate go run asm.go -out issue62.s //go:generate go run asm.go -out issue62.s