chore: format test/main.go
Kevin Neaton committed
Jul 17, 2020 at 23:59 UTC
fbb6b729e93e3e170f37d2221cb4e0002c7fd146
1 file changed
+18
-18
test/main.go
+18
-18
@@ -12,20 +12,20 @@ const templateFile = "../dir-index.html"
12
13
// Copied from go-ipfs/core/corehttp/gateway_indexPage.go
14
type listingTemplateData struct {
15
- GatewayURL string
16
- Listing []directoryItem
17
- Size string
18
- Path string
15
+ GatewayURL string
16
+ Listing []directoryItem
17
+ Size string
18
+ Path string
19
Breadcrumbs []breadcrumb
20
- BackLink string
21
- Hash string
20
+ BackLink string
21
+ Hash string
22
}
23
24
type directoryItem struct {
25
- Size string
26
- Name string
27
- Path string
28
- Hash string
25
+ Size string
26
+ Name string
27
+ Path string
28
+ Hash string
29
ShortHash string
30
}
31
@@ -38,16 +38,16 @@ var testPath = "/ipfs/QmFooBarQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7/a/b/c"
38
var testData = listingTemplateData{
39
GatewayURL: "//localhost:3000",
40
Listing: []directoryItem{{
41
- Size: "25 MiB",
42
- Name: "short-film.mov",
43
- Path: testPath + "/short-film.mov",
44
- Hash: "QmQuxBarQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7",
41
+ Size: "25 MiB",
42
+ Name: "short-film.mov",
43
+ Path: testPath + "/short-film.mov",
44
+ Hash: "QmQuxBarQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7",
45
ShortHash: "QmQu\u2026xDu7",
46
}, {
47
- Size: "1 KiB",
48
- Name: "this-piece-of-papers-got-47-words-37-sentences-58-words-we-wanna-know.txt",
49
- Path: testPath + "/this-piece-of-papers-got-47-words-37-sentences-58-words-we-wanna-know.txt",
50
- Hash: "QmquXbaRQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7",
47
+ Size: "1 KiB",
48
+ Name: "this-piece-of-papers-got-47-words-37-sentences-58-words-we-wanna-know.txt",
49
+ Path: testPath + "/this-piece-of-papers-got-47-words-37-sentences-58-words-we-wanna-know.txt",
50
+ Hash: "QmquXbaRQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7",
51
ShortHash: "Qmqu\u2026xDu7",
52
}},
53
Size: "25 MiB",