mirror of
https://github.com/golang/oauth2.git
synced 2025-07-21 00:00:09 +08:00
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:
parent
e1e827deaa
commit
b9780ec788
@ -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 := ""
|
||||
|
@ -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{},
|
||||
"": {},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user