From ed7f323c8f4f6bc61a75146bf34f5b8f73063a17 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Sat, 9 Mar 2019 11:36:37 +0700 Subject: 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 TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor --- src/debug/macho/file_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/debug') 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), -- cgit v1.3