diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000000..f0f10eeb51d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "assets/dir-index-html"] + path = assets/dir-index-html + url = git@github.com:ipfs/dir-index-html diff --git a/assets/README.md b/assets/README.md index caffb3abb0b..8f0632caf50 100644 --- a/assets/README.md +++ b/assets/README.md @@ -8,6 +8,5 @@ Instead, edit the source files and use `go generate` from within the assets directory: ``` -go get -u github.com/jteeuwen/go-bindata/... -go generate +go generate . ``` diff --git a/assets/assets.go b/assets/assets.go index 56437dfa156..f3f5de06948 100644 --- a/assets/assets.go +++ b/assets/assets.go @@ -1,11 +1,10 @@ -//go:generate go-bindata -pkg=assets -prefix=$GOPATH/src/gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV init-doc $GOPATH/src/gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html +//go:generate git submodule update --init ./dir-index-html +//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 //go:generate gofmt -w bindata.go - package assets import ( "fmt" - "os" "path/filepath" "github.com/ipfs/go-ipfs/core" @@ -15,9 +14,6 @@ import ( files "github.com/ipfs/go-ipfs-files" options "github.com/ipfs/interface-go-ipfs-core/options" "github.com/ipfs/interface-go-ipfs-core/path" - - // this import keeps gx from thinking the dep isn't used - _ "github.com/ipfs/dir-index-html" ) // 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) { return addAssetList(nd, initDocPaths) } -var initDirPath = filepath.Join(os.Getenv("GOPATH"), "gx", "ipfs", "QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV", "dir-index-html") -var initDirIndex = []string{ - filepath.Join(initDirPath, "knownIcons.txt"), - filepath.Join(initDirPath, "dir-index.html"), -} - -func SeedInitDirIndex(nd *core.IpfsNode) (cid.Cid, error) { - return addAssetList(nd, initDirIndex) -} - func addAssetList(nd *core.IpfsNode, l []string) (cid.Cid, error) { api, err := coreapi.NewCoreAPI(nd) if err != nil { diff --git a/assets/assets_test.go b/assets/assets_test.go index 4b0ac8294dc..2122afc0068 100644 --- a/assets/assets_test.go +++ b/assets/assets_test.go @@ -12,14 +12,6 @@ func TestEmbeddedDocs(t *testing.T) { testNFiles(initDocPaths, 5, t, "documents") } -func TestDirIndex(t *testing.T) { - t.Skip("skipping for now, code being tested is currently unused") - // TODO: import assets during init. - // this will require figuring out how to set the right paths up for - // referencing the code from its gx path - testNFiles(initDirIndex, 2, t, "assets") -} - func testNFiles(fs []string, wantCnt int, t *testing.T, ftype string) { if len(fs) < wantCnt { t.Fatalf("expected %d %s. got %d", wantCnt, ftype, len(fs)) diff --git a/assets/bindata.go b/assets/bindata.go index 4dd55e4f118..ad00a51de6a 100644 --- a/assets/bindata.go +++ b/assets/bindata.go @@ -1,4 +1,4 @@ -// Code generated by go-bindata. +// Package assets Code generated by go-bindata. (@generated) DO NOT EDIT. // sources: // init-doc/about // init-doc/contact @@ -7,15 +7,8 @@ // init-doc/quick-start // init-doc/readme // init-doc/security-notes -// ../../../../gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/LICENSE -// ../../../../gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/README.md -// ../../../../gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/dir-index-uncat.html -// ../../../../gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/dir-index.html -// ../../../../gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/index.go -// ../../../../gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/knownIcons.txt -// ../../../../gx/ipfs/QmT1jwrqzSMjSjLG5oBd9w4P9vXPKQksWuf5ghsE3Q88ZV/dir-index-html/package.json -// DO NOT EDIT! - +// dir-index-html/dir-index.html +// dir-index-html/knownIcons.txt package assets import ( @@ -62,21 +55,32 @@ type bindataFileInfo struct { modTime time.Time } +// Name return file name func (fi bindataFileInfo) Name() string { return fi.name } + +// Size return file size func (fi bindataFileInfo) Size() int64 { return fi.size } + +// Mode return file mode func (fi bindataFileInfo) Mode() os.FileMode { return fi.mode } + +// Mode return file modify time func (fi bindataFileInfo) ModTime() time.Time { return fi.modTime } + +// IsDir return file whether a directory func (fi bindataFileInfo) IsDir() bool { - return false + return fi.mode&os.ModeDir != 0 } + +// Sys return file is sys mode func (fi bindataFileInfo) Sys() interface{} { return nil } @@ -156,7 +160,7 @@ func initDocPing() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init-doc/ping", size: 4, mode: os.FileMode(384), modTime: time.Unix(1544511852, 0)} + info := bindataFileInfo{name: "init-doc/ping", size: 4, mode: os.FileMode(384), modTime: time.Unix(1555022883, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -176,7 +180,7 @@ func initDocQuickStart() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init-doc/quick-start", size: 1681, mode: os.FileMode(384), modTime: time.Unix(1544568089, 0)} + info := bindataFileInfo{name: "init-doc/quick-start", size: 1681, mode: os.FileMode(384), modTime: time.Unix(1555022883, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -196,7 +200,7 @@ func initDocReadme() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init-doc/readme", size: 1091, mode: os.FileMode(384), modTime: time.Unix(1539187719, 0)} + info := bindataFileInfo{name: "init-doc/readme", size: 1091, mode: os.FileMode(384), modTime: time.Unix(1555022883, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -216,67 +220,7 @@ func initDocSecurityNotes() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init-doc/security-notes", size: 1162, mode: os.FileMode(384), modTime: time.Unix(1544511852, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -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") - -func dirIndexHtmlLicenseBytes() ([]byte, error) { - return bindataRead( - _dirIndexHtmlLicense, - "dir-index-html/LICENSE", - ) -} - -func dirIndexHtmlLicense() (*asset, error) { - bytes, err := dirIndexHtmlLicenseBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "dir-index-html/LICENSE", size: 1071, mode: os.FileMode(384), modTime: time.Unix(1545346300, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -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") - -func dirIndexHtmlReadmeMdBytes() ([]byte, error) { - return bindataRead( - _dirIndexHtmlReadmeMd, - "dir-index-html/README.md", - ) -} - -func dirIndexHtmlReadmeMd() (*asset, error) { - bytes, err := dirIndexHtmlReadmeMdBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "dir-index-html/README.md", size: 1257, mode: os.FileMode(384), modTime: time.Unix(1545346300, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -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") - -func dirIndexHtmlDirIndexUncatHtmlBytes() ([]byte, error) { - return bindataRead( - _dirIndexHtmlDirIndexUncatHtml, - "dir-index-html/dir-index-uncat.html", - ) -} - -func dirIndexHtmlDirIndexUncatHtml() (*asset, error) { - bytes, err := dirIndexHtmlDirIndexUncatHtmlBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "dir-index-html/dir-index-uncat.html", size: 1746, mode: os.FileMode(384), modTime: time.Unix(1545346300, 0)} + info := bindataFileInfo{name: "init-doc/security-notes", size: 1162, mode: os.FileMode(384), modTime: time.Unix(1555022883, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -296,27 +240,7 @@ func dirIndexHtmlDirIndexHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "dir-index-html/dir-index.html", size: 106086, mode: os.FileMode(384), modTime: time.Unix(1545346300, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -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") - -func dirIndexHtmlIndexGoBytes() ([]byte, error) { - return bindataRead( - _dirIndexHtmlIndexGo, - "dir-index-html/index.go", - ) -} - -func dirIndexHtmlIndexGo() (*asset, error) { - bytes, err := dirIndexHtmlIndexGoBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "dir-index-html/index.go", size: 21, mode: os.FileMode(384), modTime: time.Unix(1545346300, 0)} + info := bindataFileInfo{name: "dir-index-html/dir-index.html", size: 106086, mode: os.FileMode(384), modTime: time.Unix(1559787449, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -336,27 +260,7 @@ func dirIndexHtmlKnowniconsTxt() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "dir-index-html/knownIcons.txt", size: 311, mode: os.FileMode(384), modTime: time.Unix(1545346300, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -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") - -func dirIndexHtmlPackageJsonBytes() ([]byte, error) { - return bindataRead( - _dirIndexHtmlPackageJson, - "dir-index-html/package.json", - ) -} - -func dirIndexHtmlPackageJson() (*asset, error) { - bytes, err := dirIndexHtmlPackageJsonBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "dir-index-html/package.json", size: 387, mode: os.FileMode(384), modTime: time.Unix(1545346300, 0)} + info := bindataFileInfo{name: "dir-index-html/knownIcons.txt", size: 311, mode: os.FileMode(384), modTime: time.Unix(1559787449, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -413,20 +317,15 @@ func AssetNames() []string { // _bindata is a table, holding each asset generator, mapped to its name. var _bindata = map[string]func() (*asset, error){ - "init-doc/about": initDocAbout, - "init-doc/contact": initDocContact, - "init-doc/help": initDocHelp, - "init-doc/ping": initDocPing, - "init-doc/quick-start": initDocQuickStart, - "init-doc/readme": initDocReadme, - "init-doc/security-notes": initDocSecurityNotes, - "dir-index-html/LICENSE": dirIndexHtmlLicense, - "dir-index-html/README.md": dirIndexHtmlReadmeMd, - "dir-index-html/dir-index-uncat.html": dirIndexHtmlDirIndexUncatHtml, - "dir-index-html/dir-index.html": dirIndexHtmlDirIndexHtml, - "dir-index-html/index.go": dirIndexHtmlIndexGo, - "dir-index-html/knownIcons.txt": dirIndexHtmlKnowniconsTxt, - "dir-index-html/package.json": dirIndexHtmlPackageJson, + "init-doc/about": initDocAbout, + "init-doc/contact": initDocContact, + "init-doc/help": initDocHelp, + "init-doc/ping": initDocPing, + "init-doc/quick-start": initDocQuickStart, + "init-doc/readme": initDocReadme, + "init-doc/security-notes": initDocSecurityNotes, + "dir-index-html/dir-index.html": dirIndexHtmlDirIndexHtml, + "dir-index-html/knownIcons.txt": dirIndexHtmlKnowniconsTxt, } // AssetDir returns the file names below a certain @@ -471,13 +370,8 @@ type bintree struct { var _bintree = &bintree{nil, map[string]*bintree{ "dir-index-html": &bintree{nil, map[string]*bintree{ - "LICENSE": &bintree{dirIndexHtmlLicense, map[string]*bintree{}}, - "README.md": &bintree{dirIndexHtmlReadmeMd, map[string]*bintree{}}, - "dir-index-uncat.html": &bintree{dirIndexHtmlDirIndexUncatHtml, map[string]*bintree{}}, - "dir-index.html": &bintree{dirIndexHtmlDirIndexHtml, map[string]*bintree{}}, - "index.go": &bintree{dirIndexHtmlIndexGo, map[string]*bintree{}}, - "knownIcons.txt": &bintree{dirIndexHtmlKnowniconsTxt, map[string]*bintree{}}, - "package.json": &bintree{dirIndexHtmlPackageJson, map[string]*bintree{}}, + "dir-index.html": &bintree{dirIndexHtmlDirIndexHtml, map[string]*bintree{}}, + "knownIcons.txt": &bintree{dirIndexHtmlKnowniconsTxt, map[string]*bintree{}}, }}, "init-doc": &bintree{nil, map[string]*bintree{ "about": &bintree{initDocAbout, map[string]*bintree{}}, diff --git a/assets/bindata_dep.go b/assets/bindata_dep.go new file mode 100644 index 00000000000..496f6ad0699 --- /dev/null +++ b/assets/bindata_dep.go @@ -0,0 +1,9 @@ +//+build never,!never + +package assets + +import ( + // Make sure go mod tracks these deps but avoid including them in the + // actual build. + _ "github.com/go-bindata/go-bindata" +) diff --git a/assets/dir-index-html b/assets/dir-index-html new file mode 160000 index 00000000000..a2330df8401 --- /dev/null +++ b/assets/dir-index-html @@ -0,0 +1 @@ +Subproject commit a2330df84015a301d77df89af4cb49f2817f2063 diff --git a/go.mod b/go.mod index 9ed7365d57e..c4ad8439e5a 100644 --- a/go.mod +++ b/go.mod @@ -11,12 +11,12 @@ require ( github.com/elgris/jsondiff v0.0.0-20160530203242-765b5c24c302 github.com/fatih/color v1.7.0 // indirect github.com/fsnotify/fsnotify v1.4.7 + github.com/go-bindata/go-bindata v3.1.1+incompatible github.com/go-critic/go-critic v0.0.0-20181204210945-ee9bf5809ead // indirect github.com/gogo/protobuf v1.2.1 github.com/golangci/golangci-lint v1.16.1-0.20190425135923-692dacb773b7 github.com/hashicorp/go-multierror v1.0.0 github.com/hashicorp/golang-lru v0.5.1 - github.com/ipfs/dir-index-html v1.0.3 github.com/ipfs/go-bitswap v0.1.1 github.com/ipfs/go-block-format v0.0.2 github.com/ipfs/go-blockservice v0.1.0 diff --git a/go.sum b/go.sum index 7238391ffdc..f65fd6f37ae 100644 --- a/go.sum +++ b/go.sum @@ -74,6 +74,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fd/go-nat v1.0.0/go.mod h1:BTBu/CKvMmOMUPkKVef1pngt2WFH/lg7E6yQnulfp6E= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/go-bindata/go-bindata v3.1.1+incompatible h1:tR4f0e4VTO7LK6B2YWyAoVEzG9ByG1wrXB4TL9+jiYg= +github.com/go-bindata/go-bindata v3.1.1+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo= github.com/go-check/check v0.0.0-20180628173108-788fd7840127 h1:0gkP6mzaMqkmpcJYCFOLkIBwI7xFExG03bbkOkCvUPI= github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= 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 github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/ipfs/bbloom v0.0.1 h1:s7KkiBPfxCeDVo47KySjK0ACPc5GJRUxFpdyWEuDjhw= github.com/ipfs/bbloom v0.0.1/go.mod h1:oqo8CVWsJFMOZqTglBG4wydCE4IQA/G2/SEofB0rjUI= -github.com/ipfs/dir-index-html v1.0.3 h1:cKdOjJBKJgewgcv97zOlqsNOle52N91d3nAkbQadnuY= -github.com/ipfs/dir-index-html v1.0.3/go.mod h1:TG9zbaH/+4MnkGel0xF4SLNhk+YZvBNo6jjBkO/LaWc= github.com/ipfs/go-bitswap v0.0.3/go.mod h1:jadAZYsP/tcRMl47ZhFxhaNuDQoXawT8iHMg+iFoQbg= github.com/ipfs/go-bitswap v0.0.9/go.mod h1:kAPf5qgn2W2DrgAcscZ3HrM9qh4pH+X8Fkk3UPrwvis= github.com/ipfs/go-bitswap v0.1.0 h1:28YsHYw9ut6wootnImPXH0WpnU5Dbo3qm6cvQ6e6wYY=