From 598477199528f7aa7f2e4309d72c0510f27975a9 Mon Sep 17 00:00:00 2001 From: "David R. Jenni" Date: Fri, 4 Nov 2016 19:52:17 +0100 Subject: [PATCH] x/tools/godoc: gofmt -s -w Change-Id: Ic14a0ec2782b52a0dfe7e892af9f5549f92cb2ec Reviewed-on: https://go-review.googlesource.com/32791 Reviewed-by: Alan Donovan --- godoc/index_test.go | 34 +++++++++++++++++----------------- godoc/vfs/emptyvfs_test.go | 6 +++--- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/godoc/index_test.go b/godoc/index_test.go index a16bdcb68d..97f31e71b7 100644 --- a/godoc/index_test.go +++ b/godoc/index_test.go @@ -187,10 +187,10 @@ func checkPackagePath(t *testing.T, c *Corpus, ix *Index) { want := map[string]map[string]bool{} if c.IndexDocs || c.IndexGoCode || c.IndexFullText { want = map[string]map[string]bool{ - "foo": map[string]bool{ + "foo": { "foo": true, }, - "bar": map[string]bool{ + "bar": { "bar": true, "other/bar": true, }, @@ -207,13 +207,13 @@ func checkExports(t *testing.T, c *Corpus, ix *Index) { want := map[string]map[string]SpotKind{} if c.IndexGoCode { want = map[string]map[string]SpotKind{ - "foo": map[string]SpotKind{ + "foo": { "Pi": ConstDecl, "Foos": VarDecl, "Foo": TypeDecl, "New": FuncDecl, }, - "other/bar": map[string]SpotKind{ + "other/bar": { "X": FuncDecl, }, } @@ -229,26 +229,26 @@ func checkIdents(t *testing.T, c *Corpus, ix *Index) { want := map[SpotKind]map[string][]Ident{} if c.IndexDocs { want = map[SpotKind]map[string][]Ident{ - PackageClause: map[string][]Ident{ - "bar": []Ident{ + PackageClause: { + "bar": { {"bar", "bar", "bar", "Package bar is another example to test races."}, {"other/bar", "bar", "bar", "Package bar is another bar package."}, }, - "foo": []Ident{{"foo", "foo", "foo", "Package foo is an example."}}, - "other": []Ident{{"other/bar", "bar", "bar", "Package bar is another bar package."}}, + "foo": {{"foo", "foo", "foo", "Package foo is an example."}}, + "other": {{"other/bar", "bar", "bar", "Package bar is another bar package."}}, }, - ConstDecl: map[string][]Ident{ - "Pi": []Ident{{"foo", "foo", "Pi", ""}}, + ConstDecl: { + "Pi": {{"foo", "foo", "Pi", ""}}, }, - VarDecl: map[string][]Ident{ - "Foos": []Ident{{"foo", "foo", "Foos", ""}}, + VarDecl: { + "Foos": {{"foo", "foo", "Foos", ""}}, }, - TypeDecl: map[string][]Ident{ - "Foo": []Ident{{"foo", "foo", "Foo", "Foo is stuff."}}, + TypeDecl: { + "Foo": {{"foo", "foo", "Foo", "Foo is stuff."}}, }, - FuncDecl: map[string][]Ident{ - "New": []Ident{{"foo", "foo", "New", ""}}, - "X": []Ident{{"other/bar", "bar", "X", ""}}, + FuncDecl: { + "New": {{"foo", "foo", "New", ""}}, + "X": {{"other/bar", "bar", "X", ""}}, }, } } diff --git a/godoc/vfs/emptyvfs_test.go b/godoc/vfs/emptyvfs_test.go index 09a6cd15e9..8ea9b01646 100644 --- a/godoc/vfs/emptyvfs_test.go +++ b/godoc/vfs/emptyvfs_test.go @@ -26,9 +26,9 @@ func TestNewNameSpace(t *testing.T) { t2.Bind("/fs1", mount, "/", vfs.BindReplace) testcases := map[string][]bool{ - "/": []bool{false, true}, - "/fs1": []bool{true, true}, - "/fs1/fs1file": []bool{true, true}, + "/": {false, true}, + "/fs1": {true, true}, + "/fs1/fs1file": {true, true}, } fss := []vfs.FileSystem{t1, t2}