Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
dir-index-html
Commits
fbb6b729
Commit
fbb6b729
authored
4 years ago
by
Kevin Neaton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: format test/main.go
parent
deab971d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
test/main.go
test/main.go
+18
-18
No files found.
test/main.go
View file @
fbb6b729
...
...
@@ -12,20 +12,20 @@ const templateFile = "../dir-index.html"
// Copied from go-ipfs/core/corehttp/gateway_indexPage.go
type
listingTemplateData
struct
{
GatewayURL
string
Listing
[]
directoryItem
Size
string
Path
string
GatewayURL
string
Listing
[]
directoryItem
Size
string
Path
string
Breadcrumbs
[]
breadcrumb
BackLink
string
Hash
string
BackLink
string
Hash
string
}
type
directoryItem
struct
{
Size
string
Name
string
Path
string
Hash
string
Size
string
Name
string
Path
string
Hash
string
ShortHash
string
}
...
...
@@ -38,16 +38,16 @@ var testPath = "/ipfs/QmFooBarQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7/a/b/c"
var
testData
=
listingTemplateData
{
GatewayURL
:
"//localhost:3000"
,
Listing
:
[]
directoryItem
{{
Size
:
"25 MiB"
,
Name
:
"short-film.mov"
,
Path
:
testPath
+
"/short-film.mov"
,
Hash
:
"QmQuxBarQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7"
,
Size
:
"25 MiB"
,
Name
:
"short-film.mov"
,
Path
:
testPath
+
"/short-film.mov"
,
Hash
:
"QmQuxBarQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7"
,
ShortHash
:
"QmQu
\u2026
xDu7"
,
},
{
Size
:
"1 KiB"
,
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"
,
Hash
:
"QmquXbaRQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7"
,
Size
:
"1 KiB"
,
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"
,
Hash
:
"QmquXbaRQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7"
,
ShortHash
:
"Qmqu
\u2026
xDu7"
,
}},
Size
:
"25 MiB"
,
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment