internal: simplify map value literal
gofmt -s -w -l does this simplification. Running gofmt when this
package is vendored causes the vendored file to be simplified.
Change-Id: I00502ff564bd5cff2614a8372db7beb1eb4519ec
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
Reviewed-on: https://go-review.googlesource.com/37013
Reviewed-by: Chris Broadfoot <cbro@golang.org>
diff --git a/internal/oauth2.go b/internal/oauth2.go
index fbe1028..e31541b 100644
--- a/internal/oauth2.go
+++ b/internal/oauth2.go
@@ -42,7 +42,7 @@
func ParseINI(ini io.Reader) (map[string]map[string]string, error) {
result := map[string]map[string]string{
- "": map[string]string{}, // root section
+ "": {}, // root section
}
scanner := bufio.NewScanner(ini)
currentSection := ""
diff --git a/internal/oauth2_test.go b/internal/oauth2_test.go
index c615855..0aafc7f 100644
--- a/internal/oauth2_test.go
+++ b/internal/oauth2_test.go
@@ -23,8 +23,8 @@
ini = nin
`,
map[string]map[string]string{
- "": map[string]string{"root": "toor"},
- "foo": map[string]string{"bar": "hop", "ini": "nin"},
+ "": {"root": "toor"},
+ "foo": {"bar": "hop", "ini": "nin"},
},
},
{
@@ -33,9 +33,9 @@
empty=
`,
map[string]map[string]string{
- "": map[string]string{},
- "empty": map[string]string{},
- "section": map[string]string{"empty": ""},
+ "": {},
+ "empty": {},
+ "section": {"empty": ""},
},
},
{
@@ -45,7 +45,7 @@
;comment=true
`,
map[string]map[string]string{
- "": map[string]string{},
+ "": {},
},
},
}