From 782628a7b453575d4f391ea7ab580640d74ab598 Mon Sep 17 00:00:00 2001 From: shawnps Date: Fri, 22 Jan 2016 08:41:53 -0800 Subject: [PATCH] gofmt -s --- decode_test.go | 2 +- encode_test.go | 2 +- parse.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/decode_test.go b/decode_test.go index 3805931f..76ce99db 100644 --- a/decode_test.go +++ b/decode_test.go @@ -67,7 +67,7 @@ cauchy = "cat 2" {"cyan", "magenta", "yellow", "black"}, }, My: map[string]cats{ - "Cats": cats{Plato: "cat 1", Cauchy: "cat 2"}, + "Cats": {Plato: "cat 1", Cauchy: "cat 2"}, }, } if !reflect.DeepEqual(val, answer) { diff --git a/encode_test.go b/encode_test.go index 445ca8e2..6aa289d2 100644 --- a/encode_test.go +++ b/encode_test.go @@ -349,7 +349,7 @@ ArrayOfMixedSlices = [[1, 2], ["a", "b"]] "map": map[string]interface{}{ "zero": 5, "arr": []map[string]int{ - map[string]int{ + { "friend": 5, }, }, diff --git a/parse.go b/parse.go index c6069be1..dd927dac 100644 --- a/parse.go +++ b/parse.go @@ -401,7 +401,7 @@ func stripFirstNewline(s string) string { if len(s) == 0 || s[0] != '\n' { return s } - return s[1:len(s)] + return s[1:] } func stripEscapedWhitespace(s string) string {