Commit fbb6b729 authored by Kevin Neaton's avatar Kevin Neaton

chore: format test/main.go

parent deab971d
...@@ -12,20 +12,20 @@ const templateFile = "../dir-index.html" ...@@ -12,20 +12,20 @@ const templateFile = "../dir-index.html"
// Copied from go-ipfs/core/corehttp/gateway_indexPage.go // Copied from go-ipfs/core/corehttp/gateway_indexPage.go
type listingTemplateData struct { type listingTemplateData struct {
GatewayURL string GatewayURL string
Listing []directoryItem Listing []directoryItem
Size string Size string
Path string Path string
Breadcrumbs []breadcrumb Breadcrumbs []breadcrumb
BackLink string BackLink string
Hash string Hash string
} }
type directoryItem struct { type directoryItem struct {
Size string Size string
Name string Name string
Path string Path string
Hash string Hash string
ShortHash string ShortHash string
} }
...@@ -38,16 +38,16 @@ var testPath = "/ipfs/QmFooBarQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7/a/b/c" ...@@ -38,16 +38,16 @@ var testPath = "/ipfs/QmFooBarQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7/a/b/c"
var testData = listingTemplateData{ var testData = listingTemplateData{
GatewayURL: "//localhost:3000", GatewayURL: "//localhost:3000",
Listing: []directoryItem{{ Listing: []directoryItem{{
Size: "25 MiB", Size: "25 MiB",
Name: "short-film.mov", Name: "short-film.mov",
Path: testPath + "/short-film.mov", Path: testPath + "/short-film.mov",
Hash: "QmQuxBarQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7", Hash: "QmQuxBarQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7",
ShortHash: "QmQu\u2026xDu7", ShortHash: "QmQu\u2026xDu7",
}, { }, {
Size: "1 KiB", Size: "1 KiB",
Name: "this-piece-of-papers-got-47-words-37-sentences-58-words-we-wanna-know.txt", Name: "this-piece-of-papers-got-47-words-37-sentences-58-words-we-wanna-know.txt",
Path: testPath + "/this-piece-of-papers-got-47-words-37-sentences-58-words-we-wanna-know.txt", Path: testPath + "/this-piece-of-papers-got-47-words-37-sentences-58-words-we-wanna-know.txt",
Hash: "QmquXbaRQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7", Hash: "QmquXbaRQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7",
ShortHash: "Qmqu\u2026xDu7", ShortHash: "Qmqu\u2026xDu7",
}}, }},
Size: "25 MiB", Size: "25 MiB",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment