aboutsummaryrefslogtreecommitdiff
path: root/src/encoding
diff options
context:
space:
mode:
authorAinar Garipov <gugl.zadolbal@gmail.com>2019-09-09 09:00:53 +0300
committerBrad Fitzpatrick <bradfitz@golang.org>2019-09-09 18:57:05 +0000
commit51c8d969bd8a9992002a11373f91564c326e6d77 (patch)
tree9827d9123831e3ee459633d905478374659bf718 /src/encoding
parent28f8f55bd29f997fc814782f161ae09520955a8d (diff)
downloadgo-51c8d969bd8a9992002a11373f91564c326e6d77.tar.xz
src: gofmt -s
Change-Id: I56d7eeaf777ac30886ee77428ca1ac72b77fbf7d Reviewed-on: https://go-review.googlesource.com/c/go/+/193849 Run-TryBot: Dave Cheney <dave@cheney.net> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/encoding')
-rw-r--r--src/encoding/csv/fuzz.go14
-rw-r--r--src/encoding/gob/codec_test.go2
-rw-r--r--src/encoding/json/encode_test.go4
3 files changed, 10 insertions, 10 deletions
diff --git a/src/encoding/csv/fuzz.go b/src/encoding/csv/fuzz.go
index dc33893dd7..8be21d5d28 100644
--- a/src/encoding/csv/fuzz.go
+++ b/src/encoding/csv/fuzz.go
@@ -17,13 +17,13 @@ func Fuzz(data []byte) int {
buf := new(bytes.Buffer)
for _, tt := range []Reader{
- Reader{},
- Reader{Comma: ';'},
- Reader{Comma: '\t'},
- Reader{LazyQuotes: true},
- Reader{TrimLeadingSpace: true},
- Reader{Comment: '#'},
- Reader{Comment: ';'},
+ {},
+ {Comma: ';'},
+ {Comma: '\t'},
+ {LazyQuotes: true},
+ {TrimLeadingSpace: true},
+ {Comment: '#'},
+ {Comment: ';'},
} {
r := NewReader(bytes.NewReader(data))
r.Comma = tt.Comma
diff --git a/src/encoding/gob/codec_test.go b/src/encoding/gob/codec_test.go
index 494abc9b91..f38e88b638 100644
--- a/src/encoding/gob/codec_test.go
+++ b/src/encoding/gob/codec_test.go
@@ -591,7 +591,7 @@ func TestEndToEnd(t *testing.T) {
B: 18,
C: -5,
M: map[string]*float64{"pi": &pi, "e": &e},
- M2: map[int]T3{4: T3{X: pi, Z: &meaning}, 10: T3{X: e, Z: &fingers}},
+ M2: map[int]T3{4: {X: pi, Z: &meaning}, 10: {X: e, Z: &fingers}},
Mstring: map[string]string{"pi": "3.14", "e": "2.71"},
Mintptr: map[int]*int{meaning: &fingers, fingers: &meaning},
Mcomp: map[complex128]complex128{comp1: comp2, comp2: comp1},
diff --git a/src/encoding/json/encode_test.go b/src/encoding/json/encode_test.go
index 642f397fb9..daab713766 100644
--- a/src/encoding/json/encode_test.go
+++ b/src/encoding/json/encode_test.go
@@ -796,8 +796,8 @@ func TestTextMarshalerMapKeysAreSorted(t *testing.T) {
// https://golang.org/issue/33675
func TestNilMarshalerTextMapKey(t *testing.T) {
b, err := Marshal(map[*unmarshalerText]int{
- (*unmarshalerText)(nil): 1,
- &unmarshalerText{"A", "B"}: 2,
+ (*unmarshalerText)(nil): 1,
+ {"A", "B"}: 2,
})
if err != nil {
t.Fatalf("Failed to Marshal *text.Marshaler: %v", err)