diff options
author | Shulhan <m.shulhan@gmail.com> | 2019-03-09 11:36:37 +0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2019-05-06 22:19:22 +0000 |
commit | ed7f323c8f4f6bc61a75146bf34f5b8f73063a17 (patch) | |
tree | 79a5c2f12147252f05d59e4a69c93309e54a4b77 /src/debug | |
parent | 04845fe78aeba33106c6f8a40d05e608ca687214 (diff) | |
download | go-ed7f323c8f4f6bc61a75146bf34f5b8f73063a17.tar.gz go-ed7f323c8f4f6bc61a75146bf34f5b8f73063a17.zip |
all: simplify code using "gofmt -s -w"
Most changes are removing redundant declaration of type when direct
instantiating value of map or slice, e.g. []T{T{}} become []T{{}}.
Small changes are removing the high order of subslice if its value
is the length of slice itself, e.g. T[:len(T)] become T[:].
The following file is excluded due to incompatibility with go1.4,
- src/cmd/compile/internal/gc/ssa.go
Change-Id: Id3abb09401795ce1e6da591a89749cba8502fb26
Reviewed-on: https://go-review.googlesource.com/c/go/+/166437
Run-TryBot: Dave Cheney <dave@cheney.net>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/debug')
-rw-r--r-- | src/debug/macho/file_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/debug/macho/file_test.go b/src/debug/macho/file_test.go index 003c14e69b..28b76f93d7 100644 --- a/src/debug/macho/file_test.go +++ b/src/debug/macho/file_test.go @@ -154,7 +154,7 @@ var fileTests = []fileTest{ nil, nil, map[string][]Reloc{ - "__text": []Reloc{ + "__text": { { Addr: 0x1d, Type: uint8(GENERIC_RELOC_VANILLA), @@ -189,7 +189,7 @@ var fileTests = []fileTest{ nil, nil, map[string][]Reloc{ - "__text": []Reloc{ + "__text": { { Addr: 0x19, Type: uint8(X86_64_RELOC_BRANCH), @@ -207,7 +207,7 @@ var fileTests = []fileTest{ Value: 2, }, }, - "__compact_unwind": []Reloc{ + "__compact_unwind": { { Addr: 0x0, Type: uint8(X86_64_RELOC_UNSIGNED), |