From b0ebbfc1a34a3ad2cf587400e370efb1c689e258 Mon Sep 17 00:00:00 2001 From: Andreas Linz Date: Thu, 27 Feb 2020 09:09:16 +0100 Subject: [PATCH] Replace jteeuwen/go-bindata with go-bindata/go-bindata The former package is unmainatained since a while and the replacement also fixes this bug I encountered when trying to build the package: https://github.com/jteeuwen/discussions/issues/6 --- Makefile | 2 +- go.mod | 2 +- go.sum | 5 +++-- ui/bindata.go | 61 +++++++++++++++++++++++++++++---------------------- 4 files changed, 40 insertions(+), 30 deletions(-) diff --git a/Makefile b/Makefile index e6474952..e10a9323 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ $(GOPATH)/bin/hound: ui/bindata.go $(SRCS) go install github.com/hound-search/hound/cmds/hound .build/bin/go-bindata: - GOPATH=`pwd`/.build go get github.com/jteeuwen/go-bindata/... + GOPATH=`pwd`/.build go get github.com/go-bindata/go-bindata/... ui/bindata.go: .build/bin/go-bindata node_modules $(wildcard ui/assets/**/*) rsync -r ui/assets/* .build/ui diff --git a/go.mod b/go.mod index 2fac68f1..aeb1cf23 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module github.com/hound-search/hound go 1.13 -require github.com/jteeuwen/go-bindata v3.0.7+incompatible // indirect +require github.com/go-bindata/go-bindata v3.1.2+incompatible // indirect diff --git a/go.sum b/go.sum index 966c763c..19845fb4 100644 --- a/go.sum +++ b/go.sum @@ -1,2 +1,3 @@ -github.com/jteeuwen/go-bindata v3.0.7+incompatible h1:91Uy4d9SYVr1kyTJ15wJsog+esAZZl7JmEfTkwmhJts= -github.com/jteeuwen/go-bindata v3.0.7+incompatible/go.mod h1:JVvhzYOiGBnFSYRyV00iY8q7/0PThjIYav1p9h5dmKs= +github.com/go-bindata/go-bindata v1.0.0 h1:DZ34txDXWn1DyWa+vQf7V9ANc2ILTtrEjtlsdJRF26M= +github.com/go-bindata/go-bindata v3.1.2+incompatible h1:5vjJMVhowQdPzjE1LdxyFF7YFTXg5IgGVW4gBr5IbvE= +github.com/go-bindata/go-bindata v3.1.2+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo= diff --git a/ui/bindata.go b/ui/bindata.go index 80946eae..169ef1aa 100644 --- a/ui/bindata.go +++ b/ui/bindata.go @@ -1,4 +1,4 @@ -// Code generated by go-bindata. +// Code generated for package ui by go-bindata DO NOT EDIT. (@generated) // sources: // .build/ui/css/hound.css // .build/ui/css/octicons/LICENSE.txt @@ -22,8 +22,6 @@ // .build/ui/js/jquery-2.1.3.min.js // .build/ui/js/react-0.12.2.min.js // .build/ui/open_search.tpl.xml -// DO NOT EDIT! - package ui import ( @@ -70,21 +68,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 } @@ -104,7 +113,7 @@ func cssHoundCss() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "css/hound.css", size: 6037, mode: os.FileMode(420), modTime: time.Unix(1581467322, 0)} + info := bindataFileInfo{name: "css/hound.css", size: 6037, mode: os.FileMode(420), modTime: time.Unix(1582790920, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -124,7 +133,7 @@ func cssOcticonsLicenseTxt() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "css/octicons/LICENSE.txt", size: 293, mode: os.FileMode(420), modTime: time.Unix(1581467322, 0)} + info := bindataFileInfo{name: "css/octicons/LICENSE.txt", size: 293, mode: os.FileMode(420), modTime: time.Unix(1582790920, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -144,7 +153,7 @@ func cssOcticonsReadmeMd() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "css/octicons/README.md", size: 200, mode: os.FileMode(420), modTime: time.Unix(1581467322, 0)} + info := bindataFileInfo{name: "css/octicons/README.md", size: 200, mode: os.FileMode(420), modTime: time.Unix(1582790920, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -164,7 +173,7 @@ func cssOcticonsOcticonsLocalTtf() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "css/octicons/octicons-local.ttf", size: 52764, mode: os.FileMode(420), modTime: time.Unix(1581467322, 0)} + info := bindataFileInfo{name: "css/octicons/octicons-local.ttf", size: 52764, mode: os.FileMode(420), modTime: time.Unix(1582790920, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -184,7 +193,7 @@ func cssOcticonsOcticonsCss() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "css/octicons/octicons.css", size: 11740, mode: os.FileMode(420), modTime: time.Unix(1581467322, 0)} + info := bindataFileInfo{name: "css/octicons/octicons.css", size: 11740, mode: os.FileMode(420), modTime: time.Unix(1582790920, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -204,7 +213,7 @@ func cssOcticonsOcticonsEot() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "css/octicons/octicons.eot", size: 31440, mode: os.FileMode(420), modTime: time.Unix(1581467322, 0)} + info := bindataFileInfo{name: "css/octicons/octicons.eot", size: 31440, mode: os.FileMode(420), modTime: time.Unix(1582790920, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -224,7 +233,7 @@ func cssOcticonsOcticonsLess() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "css/octicons/octicons.less", size: 12018, mode: os.FileMode(420), modTime: time.Unix(1581467322, 0)} + info := bindataFileInfo{name: "css/octicons/octicons.less", size: 12018, mode: os.FileMode(420), modTime: time.Unix(1582790920, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -244,7 +253,7 @@ func cssOcticonsOcticonsSvg() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "css/octicons/octicons.svg", size: 86997, mode: os.FileMode(420), modTime: time.Unix(1581467322, 0)} + info := bindataFileInfo{name: "css/octicons/octicons.svg", size: 86997, mode: os.FileMode(420), modTime: time.Unix(1582790920, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -264,7 +273,7 @@ func cssOcticonsOcticonsTtf() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "css/octicons/octicons.ttf", size: 31272, mode: os.FileMode(420), modTime: time.Unix(1581467322, 0)} + info := bindataFileInfo{name: "css/octicons/octicons.ttf", size: 31272, mode: os.FileMode(420), modTime: time.Unix(1582790920, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -284,7 +293,7 @@ func cssOcticonsOcticonsWoff() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "css/octicons/octicons.woff", size: 17492, mode: os.FileMode(420), modTime: time.Unix(1581467322, 0)} + info := bindataFileInfo{name: "css/octicons/octicons.woff", size: 17492, mode: os.FileMode(420), modTime: time.Unix(1582790920, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -304,7 +313,7 @@ func cssOcticonsSprocketsOcticonsScss() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "css/octicons/sprockets-octicons.scss", size: 11758, mode: os.FileMode(420), modTime: time.Unix(1581467322, 0)} + info := bindataFileInfo{name: "css/octicons/sprockets-octicons.scss", size: 11758, mode: os.FileMode(420), modTime: time.Unix(1582790920, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -324,7 +333,7 @@ func excluded_filesTplHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "excluded_files.tpl.html", size: 459, mode: os.FileMode(420), modTime: time.Unix(1581467322, 0)} + info := bindataFileInfo{name: "excluded_files.tpl.html", size: 459, mode: os.FileMode(420), modTime: time.Unix(1582790920, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -344,7 +353,7 @@ func faviconIco() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "favicon.ico", size: 1150, mode: os.FileMode(420), modTime: time.Unix(1581467322, 0)} + info := bindataFileInfo{name: "favicon.ico", size: 1150, mode: os.FileMode(420), modTime: time.Unix(1582790920, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -364,7 +373,7 @@ func imagesBusyGif() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "images/busy.gif", size: 4178, mode: os.FileMode(420), modTime: time.Unix(1581467322, 0)} + info := bindataFileInfo{name: "images/busy.gif", size: 4178, mode: os.FileMode(420), modTime: time.Unix(1582790920, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -384,7 +393,7 @@ func indexTplHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "index.tpl.html", size: 811, mode: os.FileMode(420), modTime: time.Unix(1581467322, 0)} + info := bindataFileInfo{name: "index.tpl.html", size: 811, mode: os.FileMode(420), modTime: time.Unix(1582790920, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -404,7 +413,7 @@ func jsJsxtransformer0122Js() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "js/JSXTransformer-0.12.2.js", size: 471852, mode: os.FileMode(420), modTime: time.Unix(1581467322, 0)} + info := bindataFileInfo{name: "js/JSXTransformer-0.12.2.js", size: 471852, mode: os.FileMode(420), modTime: time.Unix(1582790920, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -424,7 +433,7 @@ func jsCommonJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "js/common.js", size: 1503, mode: os.FileMode(420), modTime: time.Unix(1581467322, 0)} + info := bindataFileInfo{name: "js/common.js", size: 1503, mode: os.FileMode(420), modTime: time.Unix(1582790920, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -444,7 +453,7 @@ func jsExcluded_filesJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "js/excluded_files.js", size: 4048, mode: os.FileMode(420), modTime: time.Unix(1581467325, 0)} + info := bindataFileInfo{name: "js/excluded_files.js", size: 4048, mode: os.FileMode(420), modTime: time.Unix(1582790922, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -464,7 +473,7 @@ func jsHoundJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "js/hound.js", size: 13855, mode: os.FileMode(420), modTime: time.Unix(1581467325, 0)} + info := bindataFileInfo{name: "js/hound.js", size: 13855, mode: os.FileMode(420), modTime: time.Unix(1582790922, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -484,7 +493,7 @@ func jsJquery213MinJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "js/jquery-2.1.3.min.js", size: 84320, mode: os.FileMode(420), modTime: time.Unix(1581467322, 0)} + info := bindataFileInfo{name: "js/jquery-2.1.3.min.js", size: 84320, mode: os.FileMode(420), modTime: time.Unix(1582790920, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -504,7 +513,7 @@ func jsReact0122MinJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "js/react-0.12.2.min.js", size: 130436, mode: os.FileMode(420), modTime: time.Unix(1581467322, 0)} + info := bindataFileInfo{name: "js/react-0.12.2.min.js", size: 130436, mode: os.FileMode(420), modTime: time.Unix(1582790920, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -524,7 +533,7 @@ func open_searchTplXml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "open_search.tpl.xml", size: 351, mode: os.FileMode(420), modTime: time.Unix(1581467322, 0)} + info := bindataFileInfo{name: "open_search.tpl.xml", size: 351, mode: os.FileMode(420), modTime: time.Unix(1582790920, 0)} a := &asset{bytes: bytes, info: info} return a, nil }