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