259 lines
9.6 KiB
Go
259 lines
9.6 KiB
Go
// Code generated by go-bindata. DO NOT EDIT.
|
|
// sources:
|
|
// assets/readme.md
|
|
// assets/version
|
|
package assets
|
|
|
|
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
|
|
}
|
|
|
|
func (fi bindataFileInfo) Name() string {
|
|
return fi.name
|
|
}
|
|
func (fi bindataFileInfo) Size() int64 {
|
|
return fi.size
|
|
}
|
|
func (fi bindataFileInfo) Mode() os.FileMode {
|
|
return fi.mode
|
|
}
|
|
func (fi bindataFileInfo) ModTime() time.Time {
|
|
return fi.modTime
|
|
}
|
|
func (fi bindataFileInfo) IsDir() bool {
|
|
return false
|
|
}
|
|
func (fi bindataFileInfo) Sys() interface{} {
|
|
return nil
|
|
}
|
|
|
|
var _assetsReadmeMd = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x54\x4d\x6f\xe3\x54\x14\xdd\xbf\x5f\xf1\xa4\xec\x2a\xc5\x56\x3a\x2a\x19\x46\x9a\x0a\x56\x61\x07\x0b\x24\x16\x08\xc9\x4e\xe2\x3a\x06\xd7\x8e\xc6\x4e\x23\x21\x16\x9e\xc9\xf7\x47\xe3\x04\xd2\x40\x43\x3a\xe9\x30\x93\x12\x3a\x34\x89\xa8\x5a\xdc\xc4\x51\xff\x8c\xef\x7b\xf6\xaa\x7f\x01\xd9\x6e\x86\x14\xaa\x0a\x34\xbb\xa7\xf7\xee\xbb\xe7\xdc\x73\xcf\xbd\x91\x08\x86\x59\xd9\x3b\x3a\x24\xc6\x73\xf7\xa2\x48\xe6\x6d\x6a\xf7\xdc\x69\x87\x54\xdb\xa2\x4a\x7a\x15\x67\x71\x49\x6a\x3f\x40\xb3\x04\xd5\x19\x98\x53\x52\xfb\xd5\x7d\xd5\x0c\xef\xa1\x5c\x42\x08\x5a\x43\x5a\xab\x92\x83\x43\x3a\x6e\x90\xa3\x11\x99\xb7\x9f\x64\x74\x3d\xab\x3d\x61\xd9\xa4\xac\x8a\x8c\xa0\x48\xbc\xa2\x0b\xfc\x2e\x93\x52\x77\xd9\x1c\xab\xe5\x14\x36\xa5\x2a\xba\xa0\xe8\xec\x66\x2c\x86\xd0\x36\x76\xac\xb9\x33\x2f\xd3\x89\x01\xcd\x9e\x57\x18\xd3\xe5\x1f\xf0\x7d\x13\x2a\x26\xcc\x3a\x50\x99\x7b\xdd\x43\xda\x2f\x42\xe5\x98\xb6\x2a\x37\x76\x13\x66\x65\xa8\xed\xd3\xb7\xd3\x87\xb9\x39\xd6\xd9\x8d\xdd\x24\x03\x83\x2e\xaa\x74\xdc\x80\xb9\x09\x66\x07\xac\x82\x73\xd5\x80\x76\x0b\xcc\x53\x32\xa8\x39\x96\xe1\x58\xa7\xff\xf8\x88\x50\x24\x12\xc1\x31\x06\xc3\xa4\xe6\xbe\x2e\xa1\x8d\x0d\x4c\xce\xc7\xa4\x68\xde\xd8\x7d\x8e\x61\x18\x0e\xae\x4b\xde\xab\x05\x58\x27\x8e\x55\xc7\x1b\x1b\x88\xe3\x38\x4d\xcb\x20\x51\xc5\xa2\xa0\x63\x51\xd2\x33\xb9\x64\x50\xab\xa8\x46\x93\x92\x92\xe6\x75\x7e\xfd\xc8\x30\xcc\x3d\xb1\x82\xcc\x7f\xcb\x3f\x93\xd7\x02\xa3\xbc\xa6\x09\xfa\x8e\x16\x7c\x40\x11\x2c\xaa\xbe\xcc\x83\xdf\xb7\x9f\xc6\x98\x58\x1c\x3b\xcb\x6b\xda\x1d\x4b\x8a\xae\xf1\xb2\x4c\x7a\x57\x60\x9b\x7e\x5a\x49\xd1\x74\x5e\x96\x71\x94\xc7\xd1\xbd\xff\x44\xe6\x23\x99\xd7\x05\x4d\x7f\xf0\xf3\xc3\xec\x56\x19\x38\x8e\x0b\xb4\xdb\x5c\x69\x47\xaa\x6d\xa8\x0f\x7d\xb9\x67\x65\xcc\x25\x3e\xfd\xec\xe3\xcf\x3f\x61\x93\x92\xc2\x61\xa8\x1f\x43\x69\x44\x5b\x53\xf8\xa5\x00\xe6\x4f\x5e\xc5\x44\x08\xcc\x17\xae\x51\x80\x76\xd1\xad\x9c\xd2\xf3\x05\x5d\x0c\xd7\xdf\xbd\xd2\x3e\x5d\x4e\x60\xff\x1c\xcc\x29\x0a\x7b\xf4\x88\xc1\xd0\x6a\x50\xfb\xb7\xd0\xbc\x61\xfb\x30\x54\x67\x38\x20\x47\x7f\x9e\xc0\xf2\x00\x39\x8b\x91\x63\x35\xa0\xb3\x74\x16\x6f\x60\x30\xfe\x42\x52\xd2\x6a\x5e\xa3\xfd\x22\x97\x55\xf3\xc2\x33\x2d\x23\xc8\x32\x07\xe6\xd4\x2d\x2c\x1d\xbb\x4f\xea\x23\xaf\x7b\xe8\xdb\xcc\x9c\x86\x12\x73\xa9\xdd\x34\x17\x1a\x64\xd5\xea\x08\x06\xdb\x00\xb3\x13\xf2\xf3\x83\xaf\x2e\xbd\xa3\x97\x74\x30\x84\xc9\x4b\x98\x95\x49\xcd\x20\x83\x5a\xc8\x27\x1c\xa6\x1b\xbb\xe9\x5c\x4f\x48\xf7\x6a\x9d\xaa\x0f\xb1\x18\x81\x59\x27\x3f\x5e\xd2\xee\x90\x1c\x54\xd1\xbf\x05\xc6\xd1\xb4\x90\xcc\x89\x38\xaa\x3e\x0d\x6e\x34\xf6\x36\x80\x11\x55\x1c\xcd\x7e\x23\xde\x5e\x63\x4d\xe7\x75\x29\xe5\xf7\x03\xef\x49\x42\x3e\x38\x44\x30\xbc\xe9\x3b\xd6\xe9\xfb\xe4\xbd\x7d\xf5\xd3\xf9\x36\x24\x67\xaf\xc1\x36\xdf\x55\x7e\x4f\x55\xed\x96\x37\x30\xdc\x93\xe7\x5e\x65\x9f\xf4\x66\x61\xfd\xf7\x12\xf8\x3f\xc8\xbe\xb7\xb6\xef\x80\x87\x20\x18\x5a\x0b\xd2\xaa\x71\xab\x72\xb8\xc0\x1a\x11\x1c\x9a\x89\xf4\x2a\xf4\xed\x31\x4a\xa8\xf8\x3b\x9c\x50\xb1\x3b\x3d\x73\xc7\x46\xb8\x31\xd6\x29\x87\x5d\x80\x93\x17\xce\xf2\xc0\xb1\x5a\x09\x49\x71\x2c\xc3\xbd\xf8\x33\x34\x40\xe2\x1d\x75\xb4\x5a\x6c\xf9\x7c\x9e\xf9\x5a\xe2\x15\x2d\x93\x0b\xe6\x23\xcb\xf2\xf1\x9d\xad\xc7\x8f\xb7\x3e\x88\x7f\x28\xec\x20\xf4\xa5\xa8\xca\xbc\x22\x7e\x95\x50\xa1\x5c\x82\x8b\xe6\xfa\x76\xfd\x5b\x09\x7f\xab\x05\x73\x02\x66\x3d\x84\xba\x03\x90\x52\xfc\xfd\xa9\x05\x00\x32\xaf\xa4\xf7\xd8\x2c\x1b\x8b\x6d\xc5\xe3\x9b\xb1\x47\x4c\x46\xdf\x95\xff\x0a\x00\x00\xff\xff\xf7\xb4\x46\x06\xba\x05\x00\x00")
|
|
|
|
func assetsReadmeMdBytes() ([]byte, error) {
|
|
return bindataRead(
|
|
_assetsReadmeMd,
|
|
"assets/readme.md",
|
|
)
|
|
}
|
|
|
|
func assetsReadmeMd() (*asset, error) {
|
|
bytes, err := assetsReadmeMdBytes()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
info := bindataFileInfo{name: "assets/readme.md", size: 1466, mode: os.FileMode(438), modTime: time.Unix(1712453357, 0)}
|
|
a := &asset{bytes: bytes, info: info}
|
|
return a, nil
|
|
}
|
|
|
|
var _assetsVersion = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x32\x34\xa8\x31\xd4\x33\xd6\x33\x00\x04\x00\x00\xff\xff\x10\xcf\x99\x2f\x08\x00\x00\x00")
|
|
|
|
func assetsVersionBytes() ([]byte, error) {
|
|
return bindataRead(
|
|
_assetsVersion,
|
|
"assets/version",
|
|
)
|
|
}
|
|
|
|
func assetsVersion() (*asset, error) {
|
|
bytes, err := assetsVersionBytes()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
info := bindataFileInfo{name: "assets/version", size: 8, mode: os.FileMode(438), modTime: time.Unix(1712453357, 0)}
|
|
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){
|
|
"assets/readme.md": assetsReadmeMd,
|
|
"assets/version": assetsVersion,
|
|
}
|
|
|
|
// 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{
|
|
"assets": &bintree{nil, map[string]*bintree{
|
|
"readme.md": &bintree{assetsReadmeMd, map[string]*bintree{}},
|
|
"version": &bintree{assetsVersion, 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, "/")...)...)
|
|
}
|
|
|