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>
This commit is contained in:
Ahmet Alp Balkan 2017-02-14 14:24:16 -08:00 committed by Chris Broadfoot
parent e1e827deaa
commit b9780ec788
2 changed files with 7 additions and 7 deletions

View File

@ -42,7 +42,7 @@ func ParseKey(key []byte) (*rsa.PrivateKey, error) {
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 := ""

View File

@ -23,8 +23,8 @@ bar = hop
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 @@ ini = nin
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 @@ empty=
;comment=true
`,
map[string]map[string]string{
"": map[string]string{},
"": {},
},
},
}