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