2020-02-13 22:55:19 +00:00
|
|
|
// Code generated for package data by go-bindata DO NOT EDIT. (@generated)
|
|
|
|
// sources:
|
|
|
|
// data/data.json
|
|
|
|
package data
|
|
|
|
|
|
|
|
import (
|
|
|
|
"bytes"
|
|
|
|
"compress/gzip"
|
|
|
|
"fmt"
|
|
|
|
"io"
|
|
|
|
"io/ioutil"
|
|
|
|
"os"
|
|
|
|
"path/filepath"
|
|
|
|
"strings"
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
func bindataRead(data []byte, name string) ([]byte, error) {
|
|
|
|
gz, err := gzip.NewReader(bytes.NewBuffer(data))
|
|
|
|
if err != nil {
|
|
|
|
return nil, fmt.Errorf("Read %q: %v", name, err)
|
|
|
|
}
|
|
|
|
|
|
|
|
var buf bytes.Buffer
|
|
|
|
_, err = io.Copy(&buf, gz)
|
|
|
|
clErr := gz.Close()
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
return nil, fmt.Errorf("Read %q: %v", name, err)
|
|
|
|
}
|
|
|
|
if clErr != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
|
|
|
|
return buf.Bytes(), nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type asset struct {
|
|
|
|
bytes []byte
|
|
|
|
info os.FileInfo
|
|
|
|
}
|
|
|
|
|
|
|
|
type bindataFileInfo struct {
|
|
|
|
name string
|
|
|
|
size int64
|
|
|
|
mode os.FileMode
|
|
|
|
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 fi.mode&os.ModeDir != 0
|
|
|
|
}
|
|
|
|
|
|
|
|
// Sys return file is sys mode
|
|
|
|
func (fi bindataFileInfo) Sys() interface{} {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-11-02 18:04:47 +00:00
|
|
|
var _dataDataJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xbd\xeb\x72\xe3\x38\x96\x2e\xfa\x7f\x9e\x02\xc7\x35\x11\x59\xd5\xc7\x92\x2d\xdf\xd2\xe9\x89\xf9\xe1\xb2\x9d\x59\x8e\xca\xb4\xb5\x6d\x67\x56\x77\xb4\x67\xbb\x20\x12\x92\x78\x4c\x01\x6c\x82\x94\xad\xae\xa9\x1d\xf5\x18\x7b\x22\x66\x5e\xae\x9e\xe4\x04\x6e\xbc\x82\x12\x29\x5b\xb2\x25\x2f\x4f\xc4\x74\x96\x08\x82\xb8\x2c\x7c\x6b\x61\x61\xad\x0f\xbf\xfd\x0b\xda\xf8\xf9\x90\x7f\x23\x21\xf7\x18\xbd\x26\xe1\xd8\x73\xc8\x65\x10\x79\x8c\xf2\x8d\x23\xf4\xdb\xbf\x20\xb4\x31\xee\xb4\x3b\xdb\xfa\x3f\xd0\x06\x89\x1c\x77\xe3\x08\xd1\xd8\xf7\x37\xe5\x0f\xf7\x71\x8f\xe0\xc0\x33\x05\xd0\x06\xf6\x7d\xf6\xd0\x0a\x42\x6f\xec\xf9\x64\x40\x44\xe9\x8d\x28\x8c\xc9\xc6\xa6\x7e\x4e\x19\x9d\x8c\x58\xcc\x5b\x38\x8e\x86\xe2\x69\x1f\xfb\x3c\x79\xdc\xf3\xa8\xdb\xc2\xae\x1b\x12\x2e\x9a\xb0\xb1\xdd\x96\xff\x67\x1e\x13\x8a\x7b\x3e\x69\x61\x77\xe4\x71\xd1\xe6\x56\xe0\xc7\x03\x4f\xb6\x76\xe3\x02\x8f\x08\x0f\xb0\x43\x3e\x7b\x7d\xe2\x4c\x1c\x9f\x6c\x7e\xf6\x46\x5e\x74\x85\xe9\x80\x84\x9b\xba\x7b\xc7\x8e\xc3\x62\x1a\x6d\x9e\x92\x3e\x8e\xfd\xe8\x3a\x62\x21\x1e\x90\x13\x1f\x73\x6e\x7e\xbb\x61\x3e\x09\x71\x24\x87\xc4\x61\xd4\xe5\x9b\x5f\xe2\x08\x47\x1e\x1d\x1c\x9b\xef\xfe\x42\x7a\x43\xc6\xee\x37\xbf\x61\xdf\x73\xed\x8f\xae\x08\x67\x71\xe8\x90\xff\x15\xb3\x08\x6f\x5e\x30\x97\x5c\x11\x1e\x85\x9e\x23\x2a\x36\xfd\xf1\x28\x27\x4e\x1c\x92\x56\xc0\xc2\x48\xf6\xd7\x3c\x11\x03\xeb\x93\xa8\x15\x84\xa4\x4f\xc2\x90\x24\xa3\xd2\x8a\x26\x01\x91\x1d\x3e\xa7\x11\x09\x29\xf6\xcf\xbb\x9b\x67\x8f\xc9\x3f\x7f\x62\x3c\xa2\x78\x94\x8c\x68\x10\xb2\xbe\xe7\x7b\x74\x50\x1a\xeb\x90\xfc\x23\x26\x3c\x1a\x12\xec\x92\xb0\x45\x1e\xa3\x10\xb7\xd4\x7f\x70\xf9\x59\xef\x51\xbc\xf2\xd7\xd6\x15\x19\xb1\x88\xb4\xce\x64\x01\xfb\xcb\x83\x90\xc5\x81\x79\x39\xf7\xd6\x27\xf1\xc4\xfe\x52\xcc\x45\x9b\x47\xc4\xfa\xde\x57\x4e\xc2\xe4\xb5\x98\x46\xde\x88\xb4\x1c\x46\xfb\x9e\xec\x87\x90\x1d\x16\x7a\xff\x94\xb3\xd4\xbe\x3f\xe4\x6d\x8f\x6d\x8d\x3b\x3d\x12\xe1\xce\xbf\x67\xc5\xad\x30\xbc\x07\x7b\x7b\xbb\xe9\x23\x29\x10\x2d\xac\x24\xa2\xe5\x33\x76\x1f\x07\x45\x79\xe5\x4a\x40\x5a\x3d\xec\xdc\x13\x2a\xc5\x59\x2c\x82\xa4\x96\xc8\xe7\x2d\xc7\x0b\x86\x24\x6c\xf1\xd8\x8b\xd4\xcc\xdc\x7c\xbe\xbe\x3b\x3b\x39\xfd\xe9\x4c\xfc\xff\xeb\xe3\xbb\x5f\xce\x6f\x7e\xba\x3b\x3e\xbb\xbe\xeb\xec\x1c\xde\x7d\x3a\xf9\x72\x77\xfd\xd3\xf1\xce\xfe\xc1\x66\x65\xb9\x9d\xfd\x03\x53\x6e\xf7\x70\xcf\x5e\xee\xe4\xa7\xe3\x93\x9f\x8e\x77\xb6\xef\xba\x97\x9f\xff\xd6\xd9\xdd\xde\xcf\x14\xbb\xaa\xf5\xd1\xab\x5a\x9f\xbc\xaa\xfc\xe0\x86\x18\x82\xdf\x53\x20\xf0\x49\x94\x01\x82\xca\x45\xfc\x44\x88\x10\x3f\x12\x1a\x79\x8e\x9c\xfc\x56\xc4\xee\x09\x6d\x3d\xa8\x55\x57\xaa\x2a\x2b\x27\xad\x11\x73\x89\x28\xa1\x97\xa8\x29\xe4\x48\xe9\xe5\xad\x80\x84\xad\x7f\x30\x35\x81\x99\x3a\x1c\xea\xb5\x7a\x1e\x6d\xb9\x5e\x28\x1e\x6d\xb1\x20\xda\x72\xa8\xb7\xd5\xf3\x68\xb6\x88\x10\xce\xa4\x0c\x89\x1c\x59\x86\x92\xa8\xed\xa6\xe0\xd5\x67\xa1\x43\x5a\x94\xb9\xa4\x25\x06\xc1\xc1\x91\x80\x33\xf1\x46\x52\x66\x4c\x68\xd4\xfa\x47\xc0\x73\x60\x30\xc2\xf7\xa4\xe5\x05\xb2\x34\x6f\xc5\x91\xe7\xb7\x9c\x21\xd6\xb8\x97\xed\x2f\x25\xd1\x03\x0b\xef\x35\x2c\x8a\xa7\x0e\xf5\xd2\xd5\x87\xdd\x16\xa3\xfe\xa4\x8c\x36\x21\xe1\xcc\x1f\xcb\x3e\x24\xed\x57\xbf\xb5\xe5\x6f\xc9\x62\x08\x09\x1e\x79\x74\x20\x4a\x52\x22\xa1\xac\xe5\xb9\x3e\x69\x89\xf5\xc9\x62\x59\xe9\xee\xf6\x08\x16\xc7\xf6\xbe\x19\x83\xb1\xe8\xf3\x4e\xf2\x5f\xcc\x8f\x47\x44\xcf\x4f\x22\x2e\x63\x1c\x6e\xf9\x5e\x6f\x4b\x2f\xa2\x2d\x55\xca\xe8\xb6\xc2\x2a\x0b\x42\xf6\x38\x49\xd7\xd9\x90\x60\x3f\x1a\xfe\xb3\x55\xd4\x9c\x9d\x9d\xf7\x72\xd9\x75\x0a\x0d\x29\xd4\x76\xc2\x68\x14\x32\xdf\x27\x61\xdd\xa5\xeb\xe0\x48\xcb\xb0\xe3\xb9\x61\x49\x04\xd5\xea\x8e\x69\x84\x07\x03\xe2\xb6\x1c\x9f\xc5\xa5\x15\xae\x80\x5c\x00\xb3\x7c\xdc\x0a\x59\xac\x85\x23\xb7\xd2\xb5\xb6\x1f\x32\x1e\x05\x38\x1a\xb6\x82\x90\x8d\x3d\xa1\x63\x65\x63\xf3\x65\x7d\xad\xc5\x7c\xe2\x44\xa5\x55\x21\x1a\x3b\x62\xd4\x8b\x98\x50\x55\xd8\x21\x62\xad\x7b\x4c\xb6\x6b\x6f\x9b\x27\xaa\x92\xb9\x2d\x32\x56\x1a\x3a\x2b\xd1\xfb\xa3\x4c\x99\x4a\x75\x1a\x91\x70\xe4\x51\x1c\x11\xb7\x25\x2a\x1a\x38\xad\x68\x18\x12\x3e\x64\xbe\xfc\x4
|
2020-02-13 22:55:19 +00:00
|
|
|
|
|
|
|
func dataDataJsonBytes() ([]byte, error) {
|
|
|
|
return bindataRead(
|
|
|
|
_dataDataJson,
|
|
|
|
"data/data.json",
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
func dataDataJson() (*asset, error) {
|
|
|
|
bytes, err := dataDataJsonBytes()
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
|
2020-11-02 18:04:47 +00:00
|
|
|
info := bindataFileInfo{name: "data/data.json", size: 1161874, mode: os.FileMode(420), modTime: time.Unix(1557785965, 0)}
|
2020-02-13 22:55:19 +00:00
|
|
|
a := &asset{bytes: bytes, info: info}
|
|
|
|
return a, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// Asset loads and returns the asset for the given name.
|
|
|
|
// It returns an error if the asset could not be found or
|
|
|
|
// could not be loaded.
|
|
|
|
func Asset(name string) ([]byte, error) {
|
|
|
|
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
|
|
|
if f, ok := _bindata[cannonicalName]; ok {
|
|
|
|
a, err := f()
|
|
|
|
if err != nil {
|
|
|
|
return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
|
|
|
|
}
|
|
|
|
return a.bytes, nil
|
|
|
|
}
|
|
|
|
return nil, fmt.Errorf("Asset %s not found", name)
|
|
|
|
}
|
|
|
|
|
|
|
|
// MustAsset is like Asset but panics when Asset would return an error.
|
|
|
|
// It simplifies safe initialization of global variables.
|
|
|
|
func MustAsset(name string) []byte {
|
|
|
|
a, err := Asset(name)
|
|
|
|
if err != nil {
|
|
|
|
panic("asset: Asset(" + name + "): " + err.Error())
|
|
|
|
}
|
|
|
|
|
|
|
|
return a
|
|
|
|
}
|
|
|
|
|
|
|
|
// AssetInfo loads and returns the asset info for the given name.
|
|
|
|
// It returns an error if the asset could not be found or
|
|
|
|
// could not be loaded.
|
|
|
|
func AssetInfo(name string) (os.FileInfo, error) {
|
|
|
|
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
|
|
|
if f, ok := _bindata[cannonicalName]; ok {
|
|
|
|
a, err := f()
|
|
|
|
if err != nil {
|
|
|
|
return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
|
|
|
|
}
|
|
|
|
return a.info, nil
|
|
|
|
}
|
|
|
|
return nil, fmt.Errorf("AssetInfo %s not found", name)
|
|
|
|
}
|
|
|
|
|
|
|
|
// AssetNames returns the names of the assets.
|
|
|
|
func AssetNames() []string {
|
|
|
|
names := make([]string, 0, len(_bindata))
|
|
|
|
for name := range _bindata {
|
|
|
|
names = append(names, name)
|
|
|
|
}
|
|
|
|
return names
|
|
|
|
}
|
|
|
|
|
|
|
|
// _bindata is a table, holding each asset generator, mapped to its name.
|
|
|
|
var _bindata = map[string]func() (*asset, error){
|
|
|
|
"data/data.json": dataDataJson,
|
|
|
|
}
|
|
|
|
|
|
|
|
// AssetDir returns the file names below a certain
|
|
|
|
// directory embedded in the file by go-bindata.
|
|
|
|
// For example if you run go-bindata on data/... and data contains the
|
|
|
|
// following hierarchy:
|
|
|
|
// data/
|
|
|
|
// foo.txt
|
|
|
|
// img/
|
|
|
|
// a.png
|
|
|
|
// b.png
|
|
|
|
// then AssetDir("data") would return []string{"foo.txt", "img"}
|
|
|
|
// AssetDir("data/img") would return []string{"a.png", "b.png"}
|
|
|
|
// AssetDir("foo.txt") and AssetDir("notexist") would return an error
|
|
|
|
// AssetDir("") will return []string{"data"}.
|
|
|
|
func AssetDir(name string) ([]string, error) {
|
|
|
|
node := _bintree
|
|
|
|
if len(name) != 0 {
|
|
|
|
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
|
|
|
pathList := strings.Split(cannonicalName, "/")
|
|
|
|
for _, p := range pathList {
|
|
|
|
node = node.Children[p]
|
|
|
|
if node == nil {
|
|
|
|
return nil, fmt.Errorf("Asset %s not found", name)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if node.Func != nil {
|
|
|
|
return nil, fmt.Errorf("Asset %s not found", name)
|
|
|
|
}
|
|
|
|
rv := make([]string, 0, len(node.Children))
|
|
|
|
for childName := range node.Children {
|
|
|
|
rv = append(rv, childName)
|
|
|
|
}
|
|
|
|
return rv, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type bintree struct {
|
|
|
|
Func func() (*asset, error)
|
|
|
|
Children map[string]*bintree
|
|
|
|
}
|
|
|
|
|
|
|
|
var _bintree = &bintree{nil, map[string]*bintree{
|
|
|
|
"data": &bintree{nil, map[string]*bintree{
|
|
|
|
"data.json": &bintree{dataDataJson, map[string]*bintree{}},
|
|
|
|
}},
|
|
|
|
}}
|
|
|
|
|
|
|
|
// RestoreAsset restores an asset under the given directory
|
|
|
|
func RestoreAsset(dir, name string) error {
|
|
|
|
data, err := Asset(name)
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
info, err := AssetInfo(name)
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// RestoreAssets restores an asset under the given directory recursively
|
|
|
|
func RestoreAssets(dir, name string) error {
|
|
|
|
children, err := AssetDir(name)
|
|
|
|
// File
|
|
|
|
if err != nil {
|
|
|
|
return RestoreAsset(dir, name)
|
|
|
|
}
|
|
|
|
// Dir
|
|
|
|
for _, child := range children {
|
|
|
|
err = RestoreAssets(dir, filepath.Join(name, child))
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func _filePath(dir, name string) string {
|
|
|
|
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
|
|
|
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
|
|
|
|
}
|