@cryptotaxi247 / kubo / commits / 3883dfe45

assets: move away from gx

1. Use a submodule for dir-index-html. This isn't a go dependency and treating it like one is more trouble than it's worth. We don't actually need to checkout the submodule unless we need to regenerate the assets. 2. Avoid a runtime dependency on dir-index-html (may shave a few bytes off the final binary?). 3. Remove unused code. 4. Avoid bundling unused files. 5. Switch to a maintained version of go-bindata. 6. Use go mod to manage go-bindata.

Steven Allen committed Jun 5, 2019 at 19:19 UTC 3883dfe45000f611cbc6b295fe6ca88eecbb47cf
9 files changed +51 -167
.gitmodules new
+3
@@ -0,0 +1,3 @@
1 +[submodule "assets/dir-index-html"]
2 + path = assets/dir-index-html
3 + url = git@github.com:ipfs/dir-index-html
assets/README.md
+1 -2
@@ -8,6 +8,5 @@ Instead, edit the source files and use `go generate` from within the
8 assets directory:
9
10 ```
11 -go get -u github.com/jteeuwen/go-bindata/...
12 -go generate
11 +go generate .
12 ```
assets/assets.go
+2 -16
@@ -1,11 +1,10 @@
1 -//go:generate go-bindata -pkg=assets -prefix=$GOPATH/src/gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV init-doc $GOPATH/src/gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html
1 +//go:generate git submodule update --init ./dir-index-html
2 +//go:generate go run github.com/go-bindata/go-bindata/go-bindata -pkg=assets init-doc dir-index-html/dir-index.html dir-index-html/knownIcons.txt
3 //go:generate gofmt -w bindata.go
3 -
4 package assets
5
6 import (
7 "fmt"
8 - "os"
8 "path/filepath"
9
10 "github.com/ipfs/go-ipfs/core"
@@ -15,9 +14,6 @@ import (
14 files "github.com/ipfs/go-ipfs-files"
15 options "github.com/ipfs/interface-go-ipfs-core/options"
16 "github.com/ipfs/interface-go-ipfs-core/path"
18 -
19 - // this import keeps gx from thinking the dep isn't used
20 - _ "github.com/ipfs/dir-index-html"
17 )
18
19 // initDocPaths lists the paths for the docs we want to seed during --init
@@ -36,16 +32,6 @@ func SeedInitDocs(nd *core.IpfsNode) (cid.Cid, error) {
32 return addAssetList(nd, initDocPaths)
33 }
34
39 -var initDirPath = filepath.Join(os.Getenv("GOPATH"), "gx", "ipfs", "QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV", "dir-index-html")
40 -var initDirIndex = []string{
41 - filepath.Join(initDirPath, "knownIcons.txt"),
42 - filepath.Join(initDirPath, "dir-index.html"),
43 -}
44 -
45 -func SeedInitDirIndex(nd *core.IpfsNode) (cid.Cid, error) {
46 - return addAssetList(nd, initDirIndex)
47 -}
48 -
35 func addAssetList(nd *core.IpfsNode, l []string) (cid.Cid, error) {
36 api, err := coreapi.NewCoreAPI(nd)
37 if err != nil {
assets/assets_test.go
-8
@@ -12,14 +12,6 @@ func TestEmbeddedDocs(t *testing.T) {
12 testNFiles(initDocPaths, 5, t, "documents")
13 }
14
15 -func TestDirIndex(t *testing.T) {
16 - t.Skip("skipping for now, code being tested is currently unused")
17 - // TODO: import assets during init.
18 - // this will require figuring out how to set the right paths up for
19 - // referencing the code from its gx path
20 - testNFiles(initDirIndex, 2, t, "assets")
21 -}
22 -
15 func testNFiles(fs []string, wantCnt int, t *testing.T, ftype string) {
16 if len(fs) < wantCnt {
17 t.Fatalf("expected %d %s. got %d", wantCnt, ftype, len(fs))
assets/bindata.go
+32 -138
@@ -1,4 +1,4 @@
1 -// Code generated by go-bindata.
1 +// Package assets Code generated by go-bindata. (@generated) DO NOT EDIT.
2 // sources:
3 // init-doc/about
4 // init-doc/contact
@@ -7,15 +7,8 @@
7 // init-doc/quick-start
8 // init-doc/readme
9 // init-doc/security-notes
10 -// ../../../../gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/LICENSE
11 -// ../../../../gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/README.md
12 -// ../../../../gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/dir-index-uncat.html
13 -// ../../../../gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/dir-index.html
14 -// ../../../../gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/index.go
15 -// ../../../../gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/knownIcons.txt
16 -// ../../../../gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/package.json
17 -// DO NOT EDIT!
18 -
10 +// dir-index-html/dir-index.html
11 +// dir-index-html/knownIcons.txt
12 package assets
13
14 import (
@@ -62,21 +55,32 @@ type bindataFileInfo struct {
55 modTime time.Time
56 }
57
58 +// Name return file name
59 func (fi bindataFileInfo) Name() string {
60 return fi.name
61 }
62 +
63 +// Size return file size
64 func (fi bindataFileInfo) Size() int64 {
65 return fi.size
66 }
67 +
68 +// Mode return file mode
69 func (fi bindataFileInfo) Mode() os.FileMode {
70 return fi.mode
71 }
72 +
73 +// Mode return file modify time
74 func (fi bindataFileInfo) ModTime() time.Time {
75 return fi.modTime
76 }
77 +
78 +// IsDir return file whether a directory
79 func (fi bindataFileInfo) IsDir() bool {
78 - return false
80 + return fi.mode&os.ModeDir != 0
81 }
82 +
83 +// Sys return file is sys mode
84 func (fi bindataFileInfo) Sys() interface{} {
85 return nil
86 }
@@ -156,7 +160,7 @@ func initDocPing() (*asset, error) {
160 return nil, err
161 }
162
159 - info := bindataFileInfo{name: "init-doc/ping", size: 4, mode: os.FileMode(384), modTime: time.Unix(1544511852, 0)}
163 + info := bindataFileInfo{name: "init-doc/ping", size: 4, mode: os.FileMode(384), modTime: time.Unix(1555022883, 0)}
164 a := &asset{bytes: bytes, info: info}
165 return a, nil
166 }
@@ -176,7 +180,7 @@ func initDocQuickStart() (*asset, error) {
180 return nil, err
181 }
182
179 - info := bindataFileInfo{name: "init-doc/quick-start", size: 1681, mode: os.FileMode(384), modTime: time.Unix(1544568089, 0)}
183 + info := bindataFileInfo{name: "init-doc/quick-start", size: 1681, mode: os.FileMode(384), modTime: time.Unix(1555022883, 0)}
184 a := &asset{bytes: bytes, info: info}
185 return a, nil
186 }
@@ -196,7 +200,7 @@ func initDocReadme() (*asset, error) {
200 return nil, err
201 }
202
199 - info := bindataFileInfo{name: "init-doc/readme", size: 1091, mode: os.FileMode(384), modTime: time.Unix(1539187719, 0)}
203 + info := bindataFileInfo{name: "init-doc/readme", size: 1091, mode: os.FileMode(384), modTime: time.Unix(1555022883, 0)}
204 a := &asset{bytes: bytes, info: info}
205 return a, nil
206 }
@@ -216,67 +220,7 @@ func initDocSecurityNotes() (*asset, error) {
220 return nil, err
221 }
222
219 - info := bindataFileInfo{name: "init-doc/security-notes", size: 1162, mode: os.FileMode(384), modTime: time.Unix(1544511852, 0)}
220 - a := &asset{bytes: bytes, info: info}
221 - return a, nil
222 -}
223 -
224 -var _dirIndexHtmlLicense = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x5c\x51\xcd\x8e\xab\x36\x14\xde\xfb\x29\x3e\xcd\x6a\x46\x42\xd3\x9f\x45\x17\xdd\x79\xc0\x09\x56\xc1\x46\xc6\xb9\x69\x96\x04\x9c\xc1\x15\xc1\x11\x76\x3a\xca\xdb\x57\x87\x64\xee\xed\xdc\x15\xc2\xe7\x7c\xbf\xc7\x8e\x0e\xb5\xb4\xa8\x7c\xef\xe6\xe8\xf0\x5c\x4b\xfb\xc2\x58\x1e\x2e\xb7\xc5\xbf\x8f\x09\xcf\xfd\x0b\x7e\xff\xf5\xb7\x3f\x20\x9b\x4d\xcb\x58\xe3\x96\xb3\x8f\xd1\x87\x19\x3e\x62\x74\x8b\x3b\xde\xf0\xbe\x74\x73\x72\x43\x86\xd3\xe2\x1c\xc2\x09\xfd\xd8\x2d\xef\x2e\x43\x0a\xe8\xe6\x1b\x2e\x6e\x89\x61\x46\x38\xa6\xce\xcf\x7e\x7e\x47\x87\x3e\x5c\x6e\x2c\x9c\x90\x46\x1f\x11\xc3\x29\x7d\x74\x8b\x43\x37\x0f\xe8\x62\x0c\xbd\xef\x92\x1b\x30\x84\xfe\x7a\x76\x73\xea\x12\xe9\x9d\xfc\xe4\x22\x9e\xd3\xe8\xf0\xd4\x3e\x10\x4f\x2f\xab\xc8\xe0\xba\x89\xf9\x19\x34\xfb\x1c\xe1\xc3\xa7\x31\x5c\x13\x16\x17\xd3\xe2\x7b\xe2\xc8\xe0\xe7\x7e\xba\x0e\xe4\xe1\x73\x3c\xf9\xb3\x7f\x28\x10\x7c\x4d\x1d\x59\x0a\xb8\x46\x97\xad\x3e\x33\x9c\xc3\xe0\x4f\xf4\x75\x6b\xac\xcb\xf5\x38\xf9\x38\x66\x18\x3c\x51\x1f\xaf\xc9\x65\x88\xf4\xb8\x96\x98\x51\x8e\x5f\xc2\x82\xe8\xa6\x89\xf5\xe1\xe2\x5d\xc4\x9a\xf5\x87\xbb\x75\x87\xac\x5f\xa8\xd0\xf4\xa8\x28\xd2\xcb\xc7\x18\xce\x5f\x93\xf8\xc8\x4e\xd7\x65\xf6\x71\x74\x2b\x66\x08\x88\x61\x55\xfc\xc7\xf5\x89\x5e\x68\xfd\x14\xa6\x29\x7c\x50\xb4\x3e\xcc\x83\xa7\x44\xf1\x4f\xc6\xe8\xc2\xdd\x31\xfc\xeb\xd6\x2c\xf7\xa3\xce\x21\xf9\xfe\x5e\xf7\x7a\x80\xcb\x8f\xab\x3e\x46\x71\xec\xa6\x09\x47\xf7\x28\xcc\x0d\xf0\x33\xba\xff\xc5\x59\x48\x3e\xa6\x6e\x4e\xbe\x9b\x70\x09\xcb\xaa\xf7\x73\xcc\x57\xc6\x6c\x29\xd0\xea\x8d\xdd\x73\x23\x20\x5b\x34\x46\x7f\x93\x85\x28\xf0\xc4\x5b\xc8\xf6\x29\xc3\x5e\xda\x52\xef\x2c\xf6\xdc\x18\xae\xec\x01\x7a\x03\xae\x0e\xf8\x4b\xaa\x22\x83\xf8\xbb\x31\xa2\x6d\xa1\x0d\x93\x75\x53\x49\x51\x64\x90\x2a\xaf\x76\x85\x54\x5b\xbc\xed\x2c\x94\xb6\xa8\x64\x2d\xad\x28\x60\x35\x48\xf0\x41\x25\x45\x4b\x64\xb5\x30\x79\xc9\x95\xe5\x6f\xb2\x92\xf6\x90\xb1\x8d\xb4\x8a\x38\x37\xda\x80\xa3\xe1\xc6\xca\x7c\x57\x71\x83\x66\x67\x1a\xdd\x0a\x70\x55\x40\x69\x25\xd5\xc6\x48\xb5\x15\xb5\x50\xf6\x15\x52\x41\x69\x88\x6f\x42\x59\xb4\x25\xaf\x2a\x92\x62\x7c\x67\x4b\x6d\xc8\x1f\x72\xdd\x1c\x8c\xdc\x96\x16\xa5\xae\x0a\x61\x5a\xbc\x09\x54\x92\xbf\x55\xe2\x2e\xa5\x0e\xc8\x2b\x2e\xeb\x0c\x05\xaf\xf9\x56\xac\x28\x6d\x4b\x61\x18\xad\xdd\xdd\x61\x5f\x0a\x7a\x22\x3d\xae\xc0\x73\x2b\xb5\xa2\x18\xb9\x56\xd6\xf0\xdc\x66\xb0\xda\xd8\xef\xd0\xbd\x6c\x45\x06\x6e\x64\x4b\x85\x6c\x8c\xae\x33\x46\x75\xea\x0d\xad\x48\x45\x38\x25\xee\x2c\x54\x35\xbe\x5c\x44\x9b\xf5\x7f\xd7\x8a\xef\x84\x28\x04\xaf\xa4\xda\xb6\x04\xa6\x88\x9f\xcb\xaf\xec\xbf\x00\x00\x00\xff\xff\x5d\x08\xc6\x03\x2f\x04\x00\x00")
225 -
226 -func dirIndexHtmlLicenseBytes() ([]byte, error) {
227 - return bindataRead(
228 - _dirIndexHtmlLicense,
229 - "dir-index-html/LICENSE",
230 - )
231 -}
232 -
233 -func dirIndexHtmlLicense() (*asset, error) {
234 - bytes, err := dirIndexHtmlLicenseBytes()
235 - if err != nil {
236 - return nil, err
237 - }
238 -
239 - info := bindataFileInfo{name: "dir-index-html/LICENSE", size: 1071, mode: os.FileMode(384), modTime: time.Unix(1545346300, 0)}
240 - a := &asset{bytes: bytes, info: info}
241 - return a, nil
242 -}
243 -
244 -var _dirIndexHtmlReadmeMd = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8c\x54\x6d\x4f\x1b\x39\x10\xfe\xbe\xbf\x62\x4e\x11\xba\x8b\x74\xeb\x45\x41\xe8\x5e\x24\x0e\xa1\x20\x04\xba\xd0\xa6\x25\x15\x6a\xa3\x7e\xf0\xda\xb3\x5e\x07\xdb\xb3\xb5\x67\x1b\xf2\xef\x2b\x6f\x08\x02\x44\x69\x3e\x45\x8a\xe7\x79\x99\x79\x66\x76\x04\xda\xc6\xd2\x06\x8d\xf7\x65\xcb\xde\x15\xc5\xf2\xb7\xe5\xd7\x3f\x5a\xe6\x2e\xfd\x5b\x55\xd6\x1b\x91\x5a\x8b\x4e\x27\x61\xa9\xaa\xa5\x36\x58\x79\xa9\xf1\x60\x72\x58\x6f\xca\x79\x24\x26\x45\xee\x60\x72\x38\x93\x75\x2a\x6b\xd7\xa3\x48\xdf\xcd\x69\xe2\x8d\xc3\x93\xc6\x49\x2e\xd3\xb7\x5e\x46\x1c\x6f\x39\x33\x65\x17\x84\xa5\xf1\x1e\x3a\x5d\xa4\x15\x2a\x2e\xaf\xe6\x17\x37\x7b\x52\x37\x03\x7c\x1f\xf2\x26\x22\x06\xd2\x58\x1e\x4c\x8e\x32\x6e\x2f\x81\x35\xd6\xaa\x95\x2c\x76\x60\x11\x90\xab\x53\xd5\xca\x10\xd0\xa5\x93\x07\xaa\x41\x3e\xb1\x0c\x5a\x46\x5d\x46\x94\xda\x23\x28\xf2\x9d\xb3\x32\xf0\x2f\x7c\x3d\xe2\x1e\x80\xe5\xfb\xff\x4b\x93\xe5\xde\xf4\x96\xe9\x8c\xe5\xb6\xaf\x85\x22\x5f\x7d\xb4\xaa\x95\x51\xcf\x2c\x73\xf5\xc2\xc8\xb8\x28\xfe\x83\x73\x1b\x51\x31\xc5\x0d\x38\x9b\xd8\x06\x03\x97\x8b\xeb\x19\x34\x14\xc1\x50\x99\x7b\x00\x23\x19\xd7\x72\x93\x8a\x62\xd1\xda\x04\x11\x3b\x02\x9b\x20\x10\x43\x8d\xd0\x27\xd4\xb0\x65\x76\x14\x50\xc0\x15\xff\x9e\xb6\xff\xd6\x1b\xe0\x16\x77\x78\x50\xa4\x11\x6c\xd8\xf1\x0e\x95\xce\x65\x0e\x8f\xd1\xa0\x06\x1b\x98\x9e\x21\x3a\xa9\xee\xa4\xc1\x3f\x81\x82\xc2\x67\x2f\xad\x4c\x50\x23\x06\xc0\x7b\x8e\x52\x31\x6a\x68\x22\xf9\x47\xee\xa2\xd8\xc5\x9e\xc7\xb1\x05\x89\xdd\x52\xe4\xdf\xea\x83\x6f\xfe\x9e\xac\x3e\x4d\xff\xf9\xd2\xd3\xcd\x62\xfa\xee\xf3\xf1\x71\xbb\xb9\x3f\xba\xf4\xf6\x1c\xf5\xd1\x6d\x68\x2f\xce\x8f\xe7\xd3\xbf\xa6\x8b\x9b\xb9\x9f\x4e\x2a\x25\x3b\xd1\x05\x33\x2e\x8a\xd1\x08\xa6\x14\x38\xda\xba\x67\x2c\x8a\x0b\x44\x07\x79\x0b\x80\x09\x56\x64\x03\xd8\x20\xe0\xcc\x39\x58\xa3\x53\xe4\x51\xc0\x19\x18\x22\x0d\x9d\x93\x6a\xa8\x4a\x2c\x23\xe7\x11\x2e\x73\x4b\x36\xa5\x1e\xd3\xab\xe1\x0d\x46\x9f\x5f\x65\xb5\x2d\x1f\x8b\x27\x69\x24\x3b\x04\xd8\x48\xe7\x12\xf4\x41\x63\x1c\x66\x95\x8f\x05\x96\xd3\x3c\x75\x6a\xb2\x67\xdd\x2b\xfe\xb9\x8e\x22\xef\xfb\x60\x79\x53\xd5\x8e\xea\xca\xcb\xc4\x18\xab\x1c\x5a\x49\x4d\xa9\xb6\x70\xe1\x75\x96\x1e\x8d\x46\x70\x2b\x03\xe7\x6e\x5a\xa9\xee\x80\xc2\x20\x77\xfa\xe2\xa3\xa1\x74\x10\x51\xae\x8d\xe5\x41\x67\x55\x63\x3e\x13\xf5\x38\xbe\x21\xac\xd2\xd8\x66\x27\x67\xbd\x79\xf2\x2c\x8c\x6d\x5e\x5f\xeb\x37\x1d\x3f\xc0\x6d\x30\xd9\xee\x90\xd8\xcc\x2a\x0c\x09\x8b\xe2\xfa\x6a\xf1\x23\x00\x00\xff\xff\x27\xdb\x5d\x6a\xe9\x04\x00\x00")
245 -
246 -func dirIndexHtmlReadmeMdBytes() ([]byte, error) {
247 - return bindataRead(
248 - _dirIndexHtmlReadmeMd,
249 - "dir-index-html/README.md",
250 - )
251 -}
252 -
253 -func dirIndexHtmlReadmeMd() (*asset, error) {
254 - bytes, err := dirIndexHtmlReadmeMdBytes()
255 - if err != nil {
256 - return nil, err
257 - }
258 -
259 - info := bindataFileInfo{name: "dir-index-html/README.md", size: 1257, mode: os.FileMode(384), modTime: time.Unix(1545346300, 0)}
260 - a := &asset{bytes: bytes, info: info}
261 - return a, nil
262 -}
263 -
264 -var _dirIndexHtmlDirIndexUncatHtml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x55\x4d\x6f\xe3\x36\x10\xbd\xfb\x57\xcc\x2a\x40\x6f\x12\x9d\x2c\xba\x6d\x1c\xd9\x05\xf2\xd1\x6e\x0b\x77\x93\x36\x01\xba\xe9\xa5\xa0\xc4\xb1\xc8\x9a\x22\x05\x72\x1c\x3b\x15\xfc\xdf\x0b\x52\xf2\xd7\xc6\xc1\xe6\xb2\x17\x89\x1e\xbe\x99\x79\xef\x69\x06\xce\xdf\x5d\xdf\x5e\x3d\x3c\xde\xdd\x80\xa4\x5a\x4f\x06\xf9\xe6\x85\x5c\x4c\x06\x00\x79\x8d\xc4\xa1\x94\xdc\x79\xa4\x71\xb2\xa0\x59\xfa\x63\x02\x2c\x5e\xbd\x4b\x53\x78\xb8\xbd\xbe\x1d\x81\x47\x14\x40\x12\x3d\x42\x0a\x35\x7f\x2e\x10\xb4\x9a\x63\x08\x81\x27\xee\x08\x1d\xe0\x0a\xac\x8b\x91\x25\x16\x0b\xf5\x13\xa4\x69\xac\xa2\x95\x99\x83\x43\x3d\x4e\x3c\x3d\x6b\xf4\x12\x91\x12\x90\x0e\x67\xe3\x84\xa9\x66\xe6\xd9\x1f\xf5\xe7\xcb\x1f\xee\xa6\x7f\xfe\xf5\xf1\x43\x71\xa5\x96\xee\x17\x79\xf6\xbb\xbb\xbc\xfc\xf7\xd3\x7c\xfa\xf4\xbe\x7e\x7c\xff\x9b\x78\xfc\x7c\xa5\xe6\x8f\x7f\xdf\x2f\xa7\x37\xd7\xac\xb0\x96\x3c\x39\xde\x64\xb5\x32\x59\xe9\x7d\xb2\xa3\x2b\x51\x37\xe8\x80\x2c\x94\xd6\x78\x72\x8b\x92\x80\xa4\xf2\xa0\x3c\x48\x74\x38\x02\x49\xd4\xf8\x11\x63\x95\x22\xb9\x28\xb2\xd2\xd6\xac\x74\xcf\x0d\xa9\x15\xc3\x55\xc3\x0a\x6d\x0b\x56\x73\x4f\xe8\x98\xaa\x2b\xf4\x0f\xf6\xea\xfe\xfe\x9a\x13\x67\xa5\x35\x4f\xe8\x28\xab\xec\x37\x93\xa6\x02\xeb\x28\x29\xd6\x8f\x55\xc3\x29\x33\xdc\x39\xbb\x84\x76\xa9\x04\xc9\x11\x0c\x9b\xd5\xc5\x3a\xc4\x1b\x2e\x84\x32\x15\xb4\x50\x73\x57\x29\x33\x82\xd3\xe1\xe6\xf2\x24\x7c\x63\x74\xd0\x0e\x00\x00\x0a\x5e\xce\x2b\x67\x17\x46\x8c\xe0\x64\x38\x1c\x5e\x0c\x00\x22\x4a\xdb\xca\xf6\x18\x89\xaa\x92\x34\x82\xb3\xef\x9b\xd5\x45\x8c\xec\xaa\x76\x91\xd8\x34\x28\x4b\x03\xd5\x3e\xad\x23\x75\xfa\xe1\x4b\x88\xe4\x5e\xf6\x90\xd2\x6a\xeb\x46\x70\x72\x7e\x7e\xbe\xc1\xe4\x6c\x2b\x2f\x27\x45\x1a\x27\x6d\x0b\xd9\x1d\x27\x09\xeb\x75\xce\xba\xd0\x20\x67\xdd\xa4\xe6\x85\x15\xcf\x11\x2b\xd4\x13\x28\x31\x4e\x3a\x75\x09\x94\x9a\x7b\x3f\x4e\x9c\x5d\x46\xd3\x7a\x44\x1f\x2d\xad\x4e\x57\x3e\x3d\xeb\xaf\xf6\xd2\x83\xec\x6d\x72\xa4\x1b\x23\x93\xef\x4c\xe1\x9b\x8b\x9c\x09\xf5\xd4\x97\xdb\x1c\x77\x87\xc2\xb1\x2d\x95\xc3\x46\xa7\x67\x47\x48\x34\xdc\xa0\x86\xf8\x4c\x05\xce\xf8\x42\xd3\x21\x9f\x7d\x5c\x1a\x74\x29\x53\x6d\x11\x71\x0e\x9c\x35\xd5\xe4\x57\x23\xc2\x92\xcd\xe0\xc0\xa8\xfe\x72\x8b\x6e\x5b\x50\x33\xc8\x3e\x06\xf3\xd7\xeb\x5d\x91\xbd\x46\xdb\xaf\xb3\xd7\x24\x26\xbe\xcc\xda\xf9\xd0\x43\xd0\x88\x1d\xe0\xe0\x3a\x27\x5e\x68\xdc\xf4\xe8\x7e\xc4\x67\xea\xc9\xa9\x06\xc5\xbe\x24\x72\xfb\xad\x73\x12\x9b\xbc\x6e\xd2\x0f\x88\x1d\x21\x1f\xa7\x2f\x9e\xfe\x29\x34\x37\xf3\x23\xdf\x6d\xc3\x90\xc4\x2b\x9d\xfa\xdd\xf9\xb2\x15\xef\x17\xb8\x6d\xb3\x4b\x5e\xce\xa7\xca\xcc\xd7\xeb\x64\x92\x65\x39\xe3\x5f\xa9\x3c\x39\x8c\xe5\x6c\x5f\x65\xdb\x82\xe3\xa6\x42\xc8\xa6\xca\x53\x58\xda\x7d\x9f\x5f\xf8\xf1\x16\x03\xda\x36\xbc\x7e\x76\xb6\xbe\x59\x11\x64\x9f\x78\x8d\x81\xea\xdb\xad\x78\x55\xfa\x76\xbe\x92\xb8\x95\xa1\x72\x1c\xb6\xaf\x3a\x10\xd0\xf7\xea\xbf\x0e\xfd\x9a\x19\x2f\xc7\x28\xce\xc9\xf1\x7d\xcb\x59\xb7\xfa\x39\xeb\xfe\xba\xfe\x0f\x00\x00\xff\xff\xdb\x20\xe5\x87\xd2\x06\x00\x00")
265 -
266 -func dirIndexHtmlDirIndexUncatHtmlBytes() ([]byte, error) {
267 - return bindataRead(
268 - _dirIndexHtmlDirIndexUncatHtml,
269 - "dir-index-html/dir-index-uncat.html",
270 - )
271 -}
272 -
273 -func dirIndexHtmlDirIndexUncatHtml() (*asset, error) {
274 - bytes, err := dirIndexHtmlDirIndexUncatHtmlBytes()
275 - if err != nil {
276 - return nil, err
277 - }
278 -
279 - info := bindataFileInfo{name: "dir-index-html/dir-index-uncat.html", size: 1746, mode: os.FileMode(384), modTime: time.Unix(1545346300, 0)}
223 + info := bindataFileInfo{name: "init-doc/security-notes", size: 1162, mode: os.FileMode(384), modTime: time.Unix(1555022883, 0)}
224 a := &asset{bytes: bytes, info: info}
225 return a, nil
226 }
@@ -296,27 +240,7 @@ func dirIndexHtmlDirIndexHtml() (*asset, error) {
240 return nil, err
241 }
242
299 - info := bindataFileInfo{name: "dir-index-html/dir-index.html", size: 106086, mode: os.FileMode(384), modTime: time.Unix(1545346300, 0)}
300 - a := &asset{bytes: bytes, info: info}
301 - return a, nil
302 -}
303 -
304 -var _dirIndexHtmlIndexGo = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x2a\x48\x4c\xce\x4e\x4c\x4f\x55\x48\xc9\x2c\xca\xcc\x4b\x49\xad\xc8\x28\xc9\xcd\xe1\x02\x04\x00\x00\xff\xff\x70\x1d\x35\x57\x15\x00\x00\x00")
305 -
306 -func dirIndexHtmlIndexGoBytes() ([]byte, error) {
307 - return bindataRead(
308 - _dirIndexHtmlIndexGo,
309 - "dir-index-html/index.go",
310 - )
311 -}
312 -
313 -func dirIndexHtmlIndexGo() (*asset, error) {
314 - bytes, err := dirIndexHtmlIndexGoBytes()
315 - if err != nil {
316 - return nil, err
317 - }
318 -
319 - info := bindataFileInfo{name: "dir-index-html/index.go", size: 21, mode: os.FileMode(384), modTime: time.Unix(1545346300, 0)}
243 + info := bindataFileInfo{name: "dir-index-html/dir-index.html", size: 106086, mode: os.FileMode(384), modTime: time.Unix(1559787449, 0)}
244 a := &asset{bytes: bytes, info: info}
245 return a, nil
246 }
@@ -336,27 +260,7 @@ func dirIndexHtmlKnowniconsTxt() (*asset, error) {
260 return nil, err
261 }
262
339 - info := bindataFileInfo{name: "dir-index-html/knownIcons.txt", size: 311, mode: os.FileMode(384), modTime: time.Unix(1545346300, 0)}
340 - a := &asset{bytes: bytes, info: info}
341 - return a, nil
342 -}
343 -
344 -var _dirIndexHtmlPackageJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x84\x8f\x4d\x4b\xf3\x40\x14\x85\xf7\xf9\x15\x97\xcb\xbb\x6c\x26\xed\x4b\xdd\x64\xab\x2e\xba\x50\x41\xa5\x1b\xeb\x62\x92\x5c\x67\x2e\xcc\x47\x98\x8f\x12\x90\xfe\x77\x99\x24\x50\x05\xc1\xed\xc3\x3d\xcf\x3d\xe7\xb3\x02\x40\x99\x93\xf6\x01\x5b\x40\xa3\x98\x42\xd2\xb8\x29\xb8\xcb\x2a\x62\x0b\xe5\x04\x00\x73\x30\xe5\x42\xa7\x34\xc6\xb6\x69\x14\x27\x9d\x3b\xd1\x7b\xdb\xf0\xf8\x11\x9b\x81\x43\xcd\x6e\xa0\xa9\xd6\xc9\x1a\xac\x00\x2e\xb3\x44\x4d\x57\xc5\x70\xee\x23\xdb\xd1\x87\x54\x4c\x7f\x18\x36\x4b\x46\xf9\x33\x85\xc8\xde\x95\xc8\x4e\xdc\x88\xff\xdf\xdd\x77\x34\x92\x1b\xc8\xf5\x4c\xa5\xea\xdb\xfb\xca\x8f\xd7\xcc\x56\xec\xf6\x62\xbb\x2c\x32\xd2\xa9\x2c\x15\xcd\xef\xfd\xca\xb8\x27\x17\x67\xf4\x70\x78\x5d\x98\x93\x76\x06\xbf\x54\xc2\x40\x86\x64\xa4\x5b\x3b\xac\x23\xa0\xf7\xd6\x72\x82\x5a\x42\x6d\xe1\x84\x6a\x82\x31\x77\x86\xa3\x86\x7f\xc7\xfb\xe7\x97\xc3\xd3\xe3\x09\x97\xec\x8f\x29\x5b\xb1\xc7\xea\x52\x55\x5f\x01\x00\x00\xff\xff\x95\xbf\xad\xd5\x83\x01\x00\x00")
345 -
346 -func dirIndexHtmlPackageJsonBytes() ([]byte, error) {
347 - return bindataRead(
348 - _dirIndexHtmlPackageJson,
349 - "dir-index-html/package.json",
350 - )
351 -}
352 -
353 -func dirIndexHtmlPackageJson() (*asset, error) {
354 - bytes, err := dirIndexHtmlPackageJsonBytes()
355 - if err != nil {
356 - return nil, err
357 - }
358 -
359 - info := bindataFileInfo{name: "dir-index-html/package.json", size: 387, mode: os.FileMode(384), modTime: time.Unix(1545346300, 0)}
263 + info := bindataFileInfo{name: "dir-index-html/knownIcons.txt", size: 311, mode: os.FileMode(384), modTime: time.Unix(1559787449, 0)}
264 a := &asset{bytes: bytes, info: info}
265 return a, nil
266 }
@@ -413,20 +317,15 @@ func AssetNames() []string {
317
318 // _bindata is a table, holding each asset generator, mapped to its name.
319 var _bindata = map[string]func() (*asset, error){
416 - "init-doc/about": initDocAbout,
417 - "init-doc/contact": initDocContact,
418 - "init-doc/help": initDocHelp,
419 - "init-doc/ping": initDocPing,
420 - "init-doc/quick-start": initDocQuickStart,
421 - "init-doc/readme": initDocReadme,
422 - "init-doc/security-notes": initDocSecurityNotes,
423 - "dir-index-html/LICENSE": dirIndexHtmlLicense,
424 - "dir-index-html/README.md": dirIndexHtmlReadmeMd,
425 - "dir-index-html/dir-index-uncat.html": dirIndexHtmlDirIndexUncatHtml,
426 - "dir-index-html/dir-index.html": dirIndexHtmlDirIndexHtml,
427 - "dir-index-html/index.go": dirIndexHtmlIndexGo,
428 - "dir-index-html/knownIcons.txt": dirIndexHtmlKnowniconsTxt,
429 - "dir-index-html/package.json": dirIndexHtmlPackageJson,
320 + "init-doc/about": initDocAbout,
321 + "init-doc/contact": initDocContact,
322 + "init-doc/help": initDocHelp,
323 + "init-doc/ping": initDocPing,
324 + "init-doc/quick-start": initDocQuickStart,
325 + "init-doc/readme": initDocReadme,
326 + "init-doc/security-notes": initDocSecurityNotes,
327 + "dir-index-html/dir-index.html": dirIndexHtmlDirIndexHtml,
328 + "dir-index-html/knownIcons.txt": dirIndexHtmlKnowniconsTxt,
329 }
330
331 // AssetDir returns the file names below a certain
@@ -471,13 +370,8 @@ type bintree struct {
370
371 var _bintree = &bintree{nil, map[string]*bintree{
372 "dir-index-html": &bintree{nil, map[string]*bintree{
474 - "LICENSE": &bintree{dirIndexHtmlLicense, map[string]*bintree{}},
475 - "README.md": &bintree{dirIndexHtmlReadmeMd, map[string]*bintree{}},
476 - "dir-index-uncat.html": &bintree{dirIndexHtmlDirIndexUncatHtml, map[string]*bintree{}},
477 - "dir-index.html": &bintree{dirIndexHtmlDirIndexHtml, map[string]*bintree{}},
478 - "index.go": &bintree{dirIndexHtmlIndexGo, map[string]*bintree{}},
479 - "knownIcons.txt": &bintree{dirIndexHtmlKnowniconsTxt, map[string]*bintree{}},
480 - "package.json": &bintree{dirIndexHtmlPackageJson, map[string]*bintree{}},
373 + "dir-index.html": &bintree{dirIndexHtmlDirIndexHtml, map[string]*bintree{}},
374 + "knownIcons.txt": &bintree{dirIndexHtmlKnowniconsTxt, map[string]*bintree{}},
375 }},
376 "init-doc": &bintree{nil, map[string]*bintree{
377 "about": &bintree{initDocAbout, map[string]*bintree{}},
assets/bindata_dep.go new
+9
@@ -0,0 +1,9 @@
1 +//+build never,!never
2 +
3 +package assets
4 +
5 +import (
6 + // Make sure go mod tracks these deps but avoid including them in the
7 + // actual build.
8 + _ "github.com/go-bindata/go-bindata"
9 +)
assets/dir-index-html new
+1
@@ -0,0 +1 @@
1 +Subproject commit a2330df84015a301d77df89af4cb49f2817f2063
go.mod
+1 -1
@@ -11,12 +11,12 @@ require (
11 github.com/elgris/jsondiff v0.0.0-20160530203242-765b5c24c302
12 github.com/fatih/color v1.7.0 // indirect
13 github.com/fsnotify/fsnotify v1.4.7
14 + github.com/go-bindata/go-bindata v3.1.1+incompatible
15 github.com/go-critic/go-critic v0.0.0-20181204210945-ee9bf5809ead // indirect
16 github.com/gogo/protobuf v1.2.1
17 github.com/golangci/golangci-lint v1.16.1-0.20190425135923-692dacb773b7
18 github.com/hashicorp/go-multierror v1.0.0
19 github.com/hashicorp/golang-lru v0.5.1
19 - github.com/ipfs/dir-index-html v1.0.3
20 github.com/ipfs/go-bitswap v0.1.1
21 github.com/ipfs/go-block-format v0.0.2
22 github.com/ipfs/go-blockservice v0.1.0
go.sum
+2 -2
@@ -74,6 +74,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv
74 github.com/fd/go-nat v1.0.0/go.mod h1:BTBu/CKvMmOMUPkKVef1pngt2WFH/lg7E6yQnulfp6E=
75 github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
76 github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
77 +github.com/go-bindata/go-bindata v3.1.1+incompatible h1:tR4f0e4VTO7LK6B2YWyAoVEzG9ByG1wrXB4TL9+jiYg=
78 +github.com/go-bindata/go-bindata v3.1.1+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo=
79 github.com/go-check/check v0.0.0-20180628173108-788fd7840127 h1:0gkP6mzaMqkmpcJYCFOLkIBwI7xFExG03bbkOkCvUPI=
80 github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98=
81 github.com/go-critic/go-critic v0.0.0-20181204210945-c3db6069acc5/go.mod h1:Jc75BZJv2dNy7opKH6bF29VveDQHfGZ6Asn/3phBesg=
@@ -185,8 +187,6 @@ github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NH
187 github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
188 github.com/ipfs/bbloom v0.0.1 h1:s7KkiBPfxCeDVo47KySjK0ACPc5GJRUxFpdyWEuDjhw=
189 github.com/ipfs/bbloom v0.0.1/go.mod h1:oqo8CVWsJFMOZqTglBG4wydCE4IQA/G2/SEofB0rjUI=
188 -github.com/ipfs/dir-index-html v1.0.3 h1:cKdOjJBKJgewgcv97zOlqsNOle52N91d3nAkbQadnuY=
189 -github.com/ipfs/dir-index-html v1.0.3/go.mod h1:TG9zbaH/+4MnkGel0xF4SLNhk+YZvBNo6jjBkO/LaWc=
190 github.com/ipfs/go-bitswap v0.0.3/go.mod h1:jadAZYsP/tcRMl47ZhFxhaNuDQoXawT8iHMg+iFoQbg=
191 github.com/ipfs/go-bitswap v0.0.9/go.mod h1:kAPf5qgn2W2DrgAcscZ3HrM9qh4pH+X8Fkk3UPrwvis=
192 github.com/ipfs/go-bitswap v0.1.0 h1:28YsHYw9ut6wootnImPXH0WpnU5Dbo3qm6cvQ6e6wYY=