Skip to content

Commit bcb71dd

Browse files
committed
webdav: run "gofmt -s" to simplify some tests.
Change-Id: Ie7422dd04b4d7a14059e33ac19cb82691cff3d3f Reviewed-on: https://go-review.googlesource.com/21632 Reviewed-by: Andrew Gerrand <[email protected]>
1 parent 9622a22 commit bcb71dd

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

webdav/prop_test.go

+18-18
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,21 @@ func TestMemPS(t *testing.T) {
7575
op: "propname",
7676
name: "/dir",
7777
wantPnames: []xml.Name{
78-
xml.Name{Space: "DAV:", Local: "resourcetype"},
79-
xml.Name{Space: "DAV:", Local: "displayname"},
80-
xml.Name{Space: "DAV:", Local: "supportedlock"},
78+
{Space: "DAV:", Local: "resourcetype"},
79+
{Space: "DAV:", Local: "displayname"},
80+
{Space: "DAV:", Local: "supportedlock"},
8181
},
8282
}, {
8383
op: "propname",
8484
name: "/file",
8585
wantPnames: []xml.Name{
86-
xml.Name{Space: "DAV:", Local: "resourcetype"},
87-
xml.Name{Space: "DAV:", Local: "displayname"},
88-
xml.Name{Space: "DAV:", Local: "getcontentlength"},
89-
xml.Name{Space: "DAV:", Local: "getlastmodified"},
90-
xml.Name{Space: "DAV:", Local: "getcontenttype"},
91-
xml.Name{Space: "DAV:", Local: "getetag"},
92-
xml.Name{Space: "DAV:", Local: "supportedlock"},
86+
{Space: "DAV:", Local: "resourcetype"},
87+
{Space: "DAV:", Local: "displayname"},
88+
{Space: "DAV:", Local: "getcontentlength"},
89+
{Space: "DAV:", Local: "getlastmodified"},
90+
{Space: "DAV:", Local: "getcontenttype"},
91+
{Space: "DAV:", Local: "getetag"},
92+
{Space: "DAV:", Local: "supportedlock"},
9393
},
9494
}},
9595
}, {
@@ -452,14 +452,14 @@ func TestMemPS(t *testing.T) {
452452
op: "propname",
453453
name: "/file",
454454
wantPnames: []xml.Name{
455-
xml.Name{Space: "DAV:", Local: "resourcetype"},
456-
xml.Name{Space: "DAV:", Local: "displayname"},
457-
xml.Name{Space: "DAV:", Local: "getcontentlength"},
458-
xml.Name{Space: "DAV:", Local: "getlastmodified"},
459-
xml.Name{Space: "DAV:", Local: "getcontenttype"},
460-
xml.Name{Space: "DAV:", Local: "getetag"},
461-
xml.Name{Space: "DAV:", Local: "supportedlock"},
462-
xml.Name{Space: "foo", Local: "bar"},
455+
{Space: "DAV:", Local: "resourcetype"},
456+
{Space: "DAV:", Local: "displayname"},
457+
{Space: "DAV:", Local: "getcontentlength"},
458+
{Space: "DAV:", Local: "getlastmodified"},
459+
{Space: "DAV:", Local: "getcontenttype"},
460+
{Space: "DAV:", Local: "getetag"},
461+
{Space: "DAV:", Local: "supportedlock"},
462+
{Space: "foo", Local: "bar"},
463463
},
464464
}},
465465
}, {

webdav/webdav_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,10 @@ func TestPrefix(t *testing.T) {
147147
}
148148
sort.Strings(got)
149149
want := map[string][]string{
150-
"/": []string{"/", "/a", "/a/b", "/a/b/c", "/a/b/e", "/a/b/e/f"},
151-
"/a/": []string{"/", "/b", "/b/c", "/b/e", "/b/e/f"},
152-
"/a/b/": []string{"/", "/c", "/e", "/e/f"},
153-
"/a/b/c/": []string{"/"},
150+
"/": {"/", "/a", "/a/b", "/a/b/c", "/a/b/e", "/a/b/e/f"},
151+
"/a/": {"/", "/b", "/b/c", "/b/e", "/b/e/f"},
152+
"/a/b/": {"/", "/c", "/e", "/e/f"},
153+
"/a/b/c/": {"/"},
154154
}[prefix]
155155
if !reflect.DeepEqual(got, want) {
156156
t.Errorf("prefix=%-9q find:\ngot %v\nwant %v", prefix, got, want)

0 commit comments

Comments
 (0)