Use short hash for uniform CID presentation of directory items

This commit is contained in:
Kevin Neaton 2020-07-14 23:25:48 -04:00
parent c5d042ac5f
commit ce0dceac34
2 changed files with 7 additions and 5 deletions

File diff suppressed because one or more lines are too long

View File

@ -25,6 +25,7 @@ type directoryItem struct {
Name string
Path string
Hash string
ShortHash string
}
type breadcrumb struct {
@ -39,11 +40,13 @@ var testData = listingTemplateData{
Name: "short-film.mov",
Path: testPath + "/short-film.mov",
Hash: "QmQuxBarQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7",
ShortHash: "QmQu\u2026xDu7",
}, {
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\u2026xDu7",
}},
Size: "25 MiB",
Path: testPath,