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-03-14 00:06:19 +00:00
|
|
|
var _dataDataJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xbd\x7b\x6f\xdb\xba\xd6\x27\xfc\xff\xf9\x14\x84\xf3\x0c\xf6\xcc\x83\xc8\xb1\x73\x6b\x9a\x41\xf1\x22\x3b\x49\x5b\xa3\x6d\xe2\x49\xd2\xee\x39\x38\x7e\x60\x28\x12\x63\x6b\x22\x93\xda\x92\x9c\x36\x27\xd3\xf9\xec\x2f\x78\x91\x44\x49\x94\x2c\xc9\x97\xd8\xce\xf2\x01\xce\x4e\x25\x8a\xd7\xc5\xb5\x16\xd7\xe5\xc7\x97\x7f\xa0\xd6\x97\x93\xe0\x07\xf6\x03\x87\x92\x5b\xec\x3f\x39\x16\xbe\xf6\x42\x87\x92\xa0\x75\x8a\x5e\xfe\x81\x50\xeb\xa9\xdb\xee\x76\xe4\x3f\x50\x0b\x87\x96\xdd\x3a\x45\x64\xea\xba\xbb\xfc\xc1\xe3\xf4\x1e\x9b\x9e\x13\x15\x40\x2d\xd3\x75\xe9\x4f\xc3\xf3\x9d\x27\xc7\xc5\x23\xcc\x4a\xb7\x42\x7f\x8a\x5b\xbb\xf2\x3d\xa1\xe4\x79\x42\xa7\x81\x61\x4e\xc3\x31\x7b\xfb\x60\xba\x41\xfc\xfa\xde\x21\xb6\x61\xda\xb6\x8f\x03\xd6\x85\x56\xa7\xcd\xff\x17\xbd\xc6\xc4\xbc\x77\xb1\x61\xda\x13\x27\x60\x7d\x36\x3c\x77\x3a\x72\x78\x6f\x5b\x57\xe6\x04\x07\x9e\x69\xe1\xaf\xce\x03\xb6\x9e\x2d\x17\xef\x7e\x75\x26\x4e\x78\x63\x92\x11\xf6\x77\xe5\xf0\xce\x2c\x8b\x4e\x49\xb8\x7b\x81\x1f\xcc\xa9\x1b\xde\x86\xd4\x37\x47\xf8\xdc\x35\x83\x20\x7a\x76\x47\x5d\xec\x9b\x21\x9f\x12\x8b\x12\x3b\xd8\xfd\x36\x0d\xcd\xd0\x21\xa3\xb3\xa8\xdd\xbf\xf0\xfd\x98\xd2\xc7\xdd\x1f\xa6\xeb\xd8\xfa\x57\x37\x38\xa0\x53\xdf\xc2\xff\x6b\x4a\x43\x73\xf7\x8a\xda\xf8\x06\x07\xa1\xef\x58\xac\xe2\x68\x3c\x0e\x09\xb0\x35\xf5\xb1\xe1\x51\x3f\xe4\xe3\x8d\xde\xb0\x89\x75\x71\x68\x78\x3e\x7e\xc0\xbe\x8f\xe3\x59\x31\xc2\x67\x0f\xf3\x01\xf7\x48\x88\x7d\x62\xba\xbd\xfe\xee\xe5\xaf\xf8\xcf\xcf\x34\x08\x89\x39\x89\x67\xd4\xf3\xe9\x83\xe3\x3a\x64\x94\x9b\x6b\x1f\xff\x3d\xc5\x41\x38\xc6\xa6\x8d\x7d\x03\xff\x0a\x7d\xd3\x10\xff\x08\x78\xb3\xce\x2f\xf6\xc9\xff\x36\x6e\xf0\x84\x86\xd8\xb8\xe4\x05\xf4\x1f\x8f\x7c\x3a\xf5\xa2\x8f\x53\x5f\x7d\x62\x6f\xf4\x1f\x4d\x03\xd6\xe7\x09\xd6\x7e\xf7\x3d\xc0\x7e\xfc\xd9\x94\x84\xce\x04\x1b\x16\x25\x0f\x0e\x1f\x07\xa3\x1d\xea\x3b\xff\xe6\xab\xd4\x7e\x3c\x09\xda\x0e\xdd\x7b\xea\xde\xe3\xd0\xec\x7e\x50\xc9\x2d\x33\xbd\xc7\x87\x87\x07\xc9\x2b\x4e\x10\x86\x29\x28\xc2\x70\x29\x7d\x9c\x7a\x59\x7a\x0d\x04\x81\x18\xf7\xa6\xf5\x88\x09\x27\x67\xb6\x09\xe2\x5a\x42\x37\x30\x2c\xc7\x1b\x63\xdf\x08\xa6\x4e\x28\x56\xe6\xee\xeb\xed\xf0\xf2\xfc\xe2\xf3\x25\xfb\xff\xdb\xb3\xe1\x5f\xbd\xbb\xcf\xc3\xb3\xcb\xdb\x61\x77\xff\x64\xf8\xe9\xfc\xdb\xf0\xf6\xf3\xd9\xfe\xd1\xf1\x6e\x61\xb9\xfd\xa3\xe3\xa8\xdc\xc1\xc9\xa1\xbe\xdc\xf9\xe7\xb3\xf3\xcf\x67\xfb\x9d\x61\xff\xfa\xeb\x3f\xbb\x07\x9d\x23\xa5\xd8\x4d\xa5\x46\x6f\x2a\x35\x79\x53\xd8\x60\x8b\x4d\xc1\xef\x84\x11\xb8\x38\x54\x18\x41\xe1\x26\x9e\x93\x45\xb0\x87\x98\x84\x8e\xc5\x17\xdf\x08\xe9\x23\x26\xc6\x4f\xb1\xeb\x72\x55\xa9\x74\x62\x4c\xa8\x8d\x59\x09\xb9\x45\xa3\x42\x16\xa7\xde\xc0\xf0\xb0\x6f\xfc\x4d\xc5\x02\x2a\x75\x58\xc4\x31\xee\x1d\x62\xd8\x8e\xcf\x5e\xed\x51\x2f\xdc\xb3\x88\xb3\x77\xef\x10\xb5\x08\x23\xce\xb8\x0c\x0e\x2d\x5e\x86\xe0\xb0\x6d\x27\xcc\xeb\x81\xfa\x16\x36\x08\xb5\xb1\xc1\x26\xc1\x32\x43\xc6\xce\xd8\x17\x71\x99\x27\x4c\x42\xe3\x6f\x2f\x48\x31\x83\x89\xf9\x88\x0d\xc7\xe3\xa5\x03\x63\x1a\x3a\xae\x61\x8d\x4d\xc9\xf7\xd4\xf1\x12\x1c\xfe\xa4\xfe\xa3\x64\x8b\xec\xad\x45\x9c\x64\xf7\x99\xb6\x41\x89\xfb\x9c\xe7\x36\x3e\x0e\xa8\xfb\xc4\xc7\x10\xf7\x5f\x3c\x6b\xf3\x67\xf1\x66\xf0\xb1\x39\x71\xc8\x88\x95\x24\x98\xb3\x32\xc3\xb1\x5d\x6c\xb0\xfd\x49\xa7\xbc\xd2\x83\xce\x04\x36\x47\xe7\x28\x9a\x83\x27\x36\xe6\xfd\xf8\x5f\xd4\x9d\x4e\xb0\x5c\x9f\x98\x5c\x9e\x4c\x7f\xcf\x75\xee\xf7\xe4\x26\xda\x13\xa5\x22\xd9\x96\xd9\x65\x9e\x4f\x7f\x3d\x27\xfb\x6c\x8c\x4d\x37\x1c\xff\xdb\xc8\x4a\xce\xee\xfe\x3b\xbe\xed\xba\x99\x8e\x64\x6a\x3b\xa7\x24\xf4\xa9\xeb\x62\xbf\xea\xd6\xb5\xcc\x50\xd2\xb0\xe5\xd8\x7e\x8e\x04\xc5\xee\x9e\x92\xd0\x1c\x8d\xb0\x6d\x58\x2e\x9d\xe6\x76\xb8\x60\xe4\x8c\x31\xf3\xd7\x86\x4f\xa7\x92\x38\x52\x3b\x5d\x4a\xfb\x31\x0d\x42\xcf\x0c\xc7\x86\xe7\xd3\x27\x87\xc9\x58\xde\xd9\x74\x59\x57\x4a\x31\x17\x5b\x61\x6e\x57\xb0\xce\x4e\x28\x71\x42\xca\x44\x95\x69\x61\xb6\xd7\x1d\xca\xfb\x75\xd8\x09\x62\x51\x49\x6d\x03\x3f\x09\x09\xad\x52\xf4\xd1\x44\x29\x53\x28\x4e\x43\xec\x4f\x1c\x62\x86\xd8\x36\x58\x45\x23\xcb\x08\xc7\x3e\x0e\xc6\xd4\xe5\xed\x74\x3b\x9d\x4e\xf
|
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-03-14 00:06:19 +00:00
|
|
|
info := bindataFileInfo{name: "data/data.json", size: 571992, 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, "/")...)...)
|
|
|
|
}
|