1
0
Fork 0
mirror of https://github.com/Luzifer/share.git synced 2024-10-18 13:24:23 +00:00
share/bindata.go

394 lines
16 KiB
Go
Raw Normal View History

// Code generated by go-bindata. DO NOT EDIT.
// sources:
// frontend/app.js
// frontend/index.html
package main
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 fileInfoEx
}
type fileInfoEx interface {
os.FileInfo
MD5Checksum() string
}
type bindataFileInfo struct {
name string
size int64
mode os.FileMode
modTime time.Time
md5checksum string
}
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) MD5Checksum() string {
return fi.md5checksum
}
func (fi bindataFileInfo) IsDir() bool {
return false
}
func (fi bindataFileInfo) Sys() interface{} {
return nil
}
var _bindataFrontendAppjs = []byte(
"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x56\xcd\x8e\xdb\x38\x0c\xbe\xfb\x29\x78\x08\x20\xb9\x9b\x3a\x5b\xb4" +
"\xa7\x64\x53\xec\xa2\x4d\x67\x06\x98\x9f\x45\x26\x73\x1b\xec\x54\xb1\x19\x4b\x53\x45\x32\x24\xb9\x49\xd1\xc9\xbb" +
"\x2f\x24\xff\xc4\x4e\xd2\x74\x51\x60\x7d\x92\x25\xf2\x23\x3f\x92\xa2\x28\xd1\xc1\x4a\x48\x7c\x98\x5f\xc3\x14\x54" +
"\x29\xe5\x24\x4a\xb5\xb2\x0e\x6e\xee\x2f\x9e\x6e\xef\x16\x4f\x9f\xee\x1e\x6e\x3f\xc2\x14\xc8\x27\x21\x11\x94\x76" +
"\xb0\xd2\xa5\xca\xc8\xa1\xdc\xdf\xb3\xf9\xcd\xd5\x62\x31\x0b\xb2\xb7\xda\x01\x93\x52\x6f\x30\x03\xa7\x81\xa5\x29" +
"\x5a\x1b\x0c\xf5\xf4\x2e\x66\xb7\xb3\xf9\xd5\x87\xa7\xd9\x7c\xee\xb5\xee\xf5\x1a\x1d\x17\x2a\x87\x0d\x2a\x07\x1b" +
"\xa3\x55\x4e\x26\x51\x34\x7a\x05\xb9\xd4\x4b\x26\x61\x30\x5e\x31\x69\x11\x5e\x8d\xa2\x28\x95\xcc\x5a\xb8\xe7\xcc" +
"\x20\x7c\x8f\x00\x84\x12\x8e\xc6\x61\x09\x30\xa0\x1b\xa1\x32\xbd\x89\x93\xa5\x50\x19\x25\x9c\x59\x9e\x72\xa6\x72" +
"\x24\x43\xa0\x18\xc3\xf4\x7d\x2d\x09\xe0\xb8\xb0\x89\x17\xb8\xd6\x2c\xa3\xf1\x24\x6c\xef\xe2\x49\x14\x16\x3e\x42" +
"\xac\x28\x16\xc2\x49\x84\x29\x7c\xae\x0c\xfe\x09\x83\xef\x95\x85\x44\xea\x94\x39\xa1\x55\xc2\xb5\x75\xbb\xcf\x93" +
"\xda\x3e\x71\x5e\x63\x98\xb0\xa2\x08\x2b\x12\x27\x0e\xb7\x8e\x36\x58\x0d\xfe\x09\xeb\x3b\x7f\x82\xeb\x25\x66\x3e" +
"\xe6\x57\x6a\xa5\xa9\x0f\x9d\x0f\x11\x69\x08\x8a\x15\xd4\x9b\xd3\xee\x76\x8b\xa7\x32\x89\x33\x63\xb4\xb9\x41\x6b" +
"\x59\x8e\xb4\x97\xcf\x9a\x24\x80\x41\x57\x1a\x55\x53\xae\x1c\xda\x97\x83\x5f\xd5\x74\x12\xf6\xcc\xb6\xc1\xe0\xb0" +
"\xb5\xe4\x93\xa5\xb3\x31\x90\xcb\xd9\x5f\x1f\xc9\xb0\xde\xb5\x65\x48\xf6\x18\x68\xc6\x1c\x1b\x82\x75\xcc\x95\x76" +
"\x08\x5b\x6e\x7a\x51\xef\x7b\xea\xc9\x9e\x50\x68\xdc\xdc\x35\xe8\xe8\x29\x8d\x81\x6e\xb9\x69\x24\xcf\xa0\x7a\xe1" +
"\x9e\xe8\x01\xde\x6e\x1f\xee\xf3\x7e\xd4\xf8\xbe\x16\xdc\xb7\xc2\x67\x62\xcb\x4d\x92\xa3\x9b\xa3\x2d\xb4\xb2\x78" +
"\x89\x2c\x43\x43\xc9\x07\xad\x1c\x2a\xf7\x7a\xf1\xad\x40\xd2\xa4\x78\x40\x49\x92\x6a\xe5\x98\x50\x68\x48\x9c\x70" +
"\x91\x61\x53\x67\xfe\xcc\x87\x55\xb1\x75\x5b\x22\x75\x06\x12\x5b\x2e\xad\x33\x42\xe5\xed\x8e\x64\xd6\x5d\xa9\x0c" +
"\xb7\x77\x2b\x4a\x46\x24\x86\xdf\xe0\x4d\x7c\x80\x24\x85\xfa\xf2\x9a\x1b\x5c\x91\x38\x61\xce\x19\x4a\xc2\xcf\xb0" +
"\x49\x6c\xe3\x95\xaf\x20\x4f\x26\x59\x33\x97\x72\x3a\xfa\x47\xac\x59\x8e\x8f\xa3\x51\xbc\x2f\xa6\x1e\xa6\x35\x69" +
"\x0b\xe9\xd7\x5d\xc4\xbd\xb8\xe5\x7a\xf3\x3a\x40\x91\x38\xfc\xd0\x73\xc5\x76\xe4\xc4\x57\x91\xa1\xee\x3b\xe1\xa3" +
"\x6e\x4d\x0a\x53\x8f\xff\x87\xd5\xa5\x49\xf1\x3d\x69\x51\xad\x49\xcf\x3a\x15\xce\x8b\x02\x55\xb6\xd0\x74\x40\x49" +
"\xb0\x40\xe2\x63\xa7\xeb\x83\x5f\x70\x9a\x95\x99\xd0\x8f\x23\xca\x58\xfa\xb2\x2e\xde\xbe\xac\x0b\xcc\xe3\xc1\xff" +
"\xc8\x21\x18\x3c\xc5\xa1\x3e\xf8\x05\x0e\xd4\x97\xde\xe3\xe8\x85\x15\x85\x14\x55\x47\x7b\x1c\x3d\xb3\xaf\xcc\xa6" +
"\x46\x14\x2e\xee\x95\xc5\xbe\x1d\x3c\xcc\xaf\x87\x9d\xdb\xe7\xaf\x8e\xaf\xfd\x31\x10\x8f\xd7\x76\x85\x4e\xb7\xb8" +
"\x98\x2d\x3a\xdb\xfd\x76\x71\x70\x97\x03\xb1\x54\x67\xed\xcd\x08\x32\x93\xfe\x79\x45\x3c\x58\x3b\xe4\xed\x3f\x2e" +
"\x9f\x6d\xe2\xdf\x86\x4b\x91\x73\x29\x72\xee\xfc\x85\xea\x88\xec\xf6\xce\xfc\xbc\xbb\xfc\xc7\xfe\xd2\x41\xdd\x9d" +
"\xcb\x42\xeb\x7e\x8e\x0a\x8d\x48\x7b\x0c\xba\x7d\xe9\xc8\x52\xa7\x23\xad\xab\x0e\x1f\x9e\x87\x0a\xdd\x6e\x84\x4b" +
"\x79\xe0\x91\xf4\xe5\x01\x52\x66\x11\xde\xfd\xfe\x6e\xdc\xc9\x4c\xa3\xdf\x7b\x23\xf6\x5c\x96\x06\xd9\x97\x49\x5f" +
"\xff\xed\x39\xfd\x76\x16\xf8\x01\x46\x86\x2b\x56\x4a\xf7\x23\x88\xce\x58\x70\x12\x60\xd7\x7b\x39\x8f\x5e\xba\x1a" +
"\xec\x64\x0c\x0f\x65\xda\x71\x81\x24\x21\xf9\x4d\xa1\x75\x31\x7e\xde\xc0\x43\x0a\x1b\xfd\xa3\x04\x36\x4f\x7b\x27" +
"\x65\xf5\x73\x7e\x34\x41\x30\xcb\x3b\x5d\xff\x4d\x6d\x22\x10\x3d\x9e\x07\x6a\x1b\xbb\x28\x1a\xd0\x55\xa9\x52\x0f" +
"\x51\x5b\x09\xed\x26\x0c\x2a\x53\x50\xb8\xa9\xa6\xa4\xca\xa9\xb0\x9d\x54\xc3\xd2\x24\xf2\xd5\xf9\x6f\x00\x00\x00" +
"\xff\xff\x2d\x32\x3d\xf5\x04\x0a\x00\x00")
func bindataFrontendAppjsBytes() ([]byte, error) {
return bindataRead(
_bindataFrontendAppjs,
"frontend/app.js",
)
}
func bindataFrontendAppjs() (*asset, error) {
bytes, err := bindataFrontendAppjsBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{
name: "frontend/app.js",
size: 2564,
md5checksum: "",
mode: os.FileMode(436),
modTime: time.Unix(1, 0),
}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _bindataFrontendIndexhtml = []byte(
"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x57\x5b\x57\xdb\xba\x12\x7e\xef\xaf\xd0\xf6\x5e\xe7\x09\x64\xe5\x46" +
"\x08\x6c\x3b\x6b\x11\x02\x05\xd2\x90\x72\x2d\xe5\x4d\xb1\xc6\xb6\x12\x59\x72\x24\x39\x26\xb0\xce\x7f\x3f\xcb\xce" +
"\x95\x9e\x42\x43\x57\x37\x2f\x66\x66\x34\xa3\xef\x9b\x19\x49\x13\xef\x2f\xa6\x02\x3b\x4b\x01\xc5\x36\x11\xed\x4f" +
"\x5e\xf1\x41\x82\xca\xc8\x77\x40\x3a\xed\x4f\x08\x79\x31\x50\x56\xfc\x83\x90\xf7\x17\xc6\xe8\x1a\x26\x19\xd7\xc0" +
"\x50\x02\x96\x22\x4b\x23\x83\x30\x5e\xd8\x4b\x55\x10\x53\x6d\xc0\xfa\x4e\x66\x43\xdc\x72\x36\x4d\xb1\xb5\x29\x2e" +
"\xfc\xa7\xbe\xf3\x80\xef\x8e\xf0\xb1\x4a\x52\x6a\xf9\x50\x80\x83\x02\x25\x2d\x48\xeb\x3b\xe7\x27\x3e\xb0\x08\x5e" +
"\x79\x4a\x9a\x80\xef\x4c\x39\xe4\xa9\xd2\x76\x63\x71\xce\x99\x8d\x7d\x06\x53\x1e\x00\x2e\x85\x5d\xc4\x25\xb7\x9c" +
"\x0a\x6c\x02\x2a\xc0\xaf\xee\x22\x13\x6b\x2e\xc7\xd8\x2a\x1c\x72\xeb\x4b\xe5\xb4\x3f\xad\x09\x75\x94\xb2\xc6\x6a" +
"\x9a\xa2\xe3\x9b\x9b\x35\x17\xc1\xe5\x18\x69\x10\xbe\x63\xec\x4c\x80\x89\x01\xac\x83\x62\x0d\xa1\xef\x14\x3c\xcc" +
"\x21\x21\x01\x93\x23\xe3\x06\x42\x65\x2c\x14\x54\x83\x1b\xa8\x84\xd0\x11\x7d\x22\x82\x0f\x0d\xb1\x39\xb7\x16\x34" +
"\x1e\x2e\x77\x20\x0d\xb7\xe2\x56\x48\x60\x0c\x59\xe9\xdc\x84\x4b\x37\x30\xc6\x29\xb7\x9d\xff\x71\x69\x21\xd2\xdc" +
"\xce\x7c\xc7\xc4\xb4\xb6\xd7\xc4\x5f\x8e\x5a\x07\xcf\x3b\xe3\x83\x70\x14\xf5\x7b\x57\x64\x3c\x69\x0c\x06\xb5\xbe" +
"\x0e\x5b\xf7\xc2\x7e\x4f\x04\xb9\x3f\xb9\xd9\xb9\x8e\x2a\x61\x5c\xab\xf8\x0e\x0a\xb4\x32\x46\x69\x1e\x71\xe9\x3b" +
"\x54\x2a\x39\x4b\x54\x66\x1c\x44\xfe\x1c\xb7\x12\x7f\x4e\x6d\x10\x2f\x48\x31\xaa\xc7\x62\xf6\x51\x5e\xc3\xb8\xdb" +
"\x20\x5d\x76\x7c\x94\x5e\x1e\x7d\x17\x83\x74\xda\x33\xe6\x8e\xd6\xe2\x6e\xa5\x9b\xb5\x9e\x74\x34\x98\xda\xef\x8d" +
"\xbc\xb6\x67\xe2\xfe\xfb\xbc\xb6\x27\x96\x19\x70\x43\x25\x2d\xcd\xc1\xa8\x64\xce\x4b\x83\x00\x6a\xc0\x90\xe9\x9e" +
"\x5b\x71\xab\xf3\x12\x51\x21\xde\x27\x50\x6f\x35\xf0\x0e\xab\x7c\x6d\xd5\xe5\xc1\x98\x5e\xf5\x8f\xf3\x51\xeb\xb4" +
"\x71\x7d\xd1\x69\x36\xed\xf3\x79\x3e\xe8\x25\x9a\x0d\x1b\xcd\x9d\x54\xe9\x2e\x19\x4c\xf5\xc5\x4e\x7d\xff\xdb\xe4" +
"\xbc\xbf\x7f\xa7\x3a\x36\x3f\x1b\x34\x2f\x45\xf4\x26\xa9\x3f\x57\xaa\x98\x47\xb1\xe0\x51\x6c\xdd\x91\x21\x07\x6e" +
"\xb5\xe6\x56\xc8\x3c\x18\xa1\x92\x69\xc5\x99\xb1\x19\xe3\x6a\xbb\x8a\xe9\x93\x7b\x39\x83\x7e\x38\xee\x3d\x27\x9d" +
"\x5c\x05\x0c\x80\x4f\x3e\x0f\xb2\x6a\x9f\x58\x7b\x77\xd6\xd9\xef\x55\x12\xe8\x9d\xe7\x93\x69\xbe\x4d\xc5\x2c\xb7" +
"\x02\xda\x37\x31\xd5\xe0\x91\xb9\xb0\xb0\x94\x10\xdb\x0b\x2c\xb4\x00\x88\x5e\x50\x79\xc2\x0f\x51\xab\xf2\x9f\x7f" +
"\xd0\x7f\x17\xb6\xb8\x8a\x5e\x90\x85\x27\x8b\xa9\xe0\x91\x3c\x44\x01\x48\x0b\xfa\x1f\x54\x54\x19\x1b\xfe\x0c\x87" +
"\x68\x7f\x2f\x7d\xda\xf0\xa8\xfd\xda\xa3\xd6\xd8\xf4\x48\x35\xa0\x40\x31\x40\x2f\x28\x50\x42\xe9\x43\xf4\x37\xb4" +
"\xea\xd0\x0a\xd6\x4b\xdc\xe2\x4e\xa2\x5c\x82\x46\x2f\x28\xa1\x3a\xe2\x12\x5b\x95\x1e\xa2\x7a\x65\x33\x92\x6b\x62" +
"\x95\xe3\x08\x24\x68\x1e\xec\x2e\x44\x9e\xd0\x08\x96\xc2\x94\x33\x50\x4b\x01\xb4\x56\x45\x40\xc6\x4d\x2a\xe8\xec" +
"\x10\x49\x25\x61\x19\xcd\x23\xab\x24\x79\x64\x79\x4f\x7b\x43\xc5\x66\x8b\xee\x91\x74\x8a\x02\x41\x8d\xf1\x1d\x49" +
"\xa7\x43\xaa\xd1\xfc\x83\xe1\x29\xa5\x92\x61\x11\x2d\x15\xc5\xf1\x45\xc3\x08\xa7\x9a\x27\x54\xcf\x9c\x65\xe2\x3d" +
"\xfa\x3a\x00\x1e\x6a\x2a\xd9\xb2\x03\xff\x76\xda\x1e\x5f\x2e\x08\xa9\x41\x21\xc5\xa6\xa8\x25\xa6\xc2\x62\x33\xc9" +
"\xa8\x06\xa7\xed\x11\xde\x5e\xf5\x94\x67\x52\x2a\x97\x2e\x34\x4d\xcb\x9a\x3b\xcb\x0e\x28\x8c\x6d\x8f\xd0\x05\x7e" +
"\x22\xe9\x74\xd9\x0f\x8c\xaf\xb8\xac\x33\x5d\xe6\x48\x28\xca\xb8\x8c\xd6\x98\xe3\xea\xc6\x7e\xff\x87\x2f\xe5\xb2" +
"\x70\x0d\x29\x4e\x33\x61\xc0\x41\x54\x73\x8a\x63\xce\x18\x48\xdf\xb1\x3a\x7b\x0d\xd9\x23\xcb\x70\x1e\x61\x7c\x0b" +
"\x38\x8b\xda\x6e\x09\xa7\x3c\xb6\x98\xa9\x5c\x16\x34\x8a\xbc\xbd\xb1\x7b\x11\xa8\xd6\xf6\xe8\x2a\xf5\xab\x40\x5c" +
"\x40\x71\x4d\xe0\xc2\x80\x0a\xa9\x78\x2d\x9d\x76\x26\xcb\xdc\xb2\x22\x9d\x1e\x89\x6b\x1f\x22\x51\x76\xe4\xfc\x8c" +
"\xcc\x0f\xc7\x66\x47\xbc\x8b\xc0\xd9\x24\x9b\x44\xc8\xe8\xc0\x77\x56\x4b\x79\x12\xe1\x50\x64\x9c\xa1\x95\x93\xd1" +
"\x1b\xb9\x5a\x97\x7e\x2b\x98\xe5\x59\x59\x7b\x6f\x2c\x84\x64\x08\x0c\x6b\x30\xa9\x92\x86\x4f\x01\xfd\xa8\xc0\xd5" +
"\xe6\x70\x76\xb0\x89\xb6\x0c\x56\x8e\x16\x5a\x09\xb3\x61\x20\xa5\x65\x8d\xb1\x84\xf6\x01\x94\xf3\xdb\xeb\xe7\xc9" +
"\x2c\x4d\xab\x3d\x3d\x52\x2a\x3e\x14\xbd\x88\xbb\x0e\x98\x6a\x68\x7b\xc5\x55\xd5\xf6\xc8\xe2\x53\xa8\x3e\x12\xb0" +
"\xbc\x73\xb6\x6c\x5f\x78\x0a\x04\x4d\xa8\xe5\x4a\xe2\x80\xeb\x40\xbc\x75\x78\xca\xf6\x5d\x15\x67\xbe\xc3\x1b\x5d" +
"\x59\x4c\x65\xa3\xab\x0c\xf4\x0c\x85\x5c\x1b\xbb\x8b\x6c\x0c\x12\x7d\x55\x69\x0a\xda\x1d\x99\x85\xbc\x1e\xdc\x2e" +
"\x36\xe6\x36\x13\x68\x9e\xda\x79\xd7\x6d\xf9\x40\x8e\x26\xc5\x5e\xa4\xee\xd6\xdd\xea\x42\x28\xdf\xc2\xd1\xab\xa7" +
"\xf0\x67\x8f\xe1\x69\x94\x1e\x0f\x49\xef\xe2\x4a\x7c\xb9\x0c\x07\xd9\x41\xd5\xd2\x7a\x4d\x91\xcb\xfe\xe3\x93\xb0" +
"\xf9\xb5\x6a\x5d\xd9\x64\xdc\xbf\x66\x47\x59\xeb\xed\xc7\xb0\xed\x91\x39\xe8\xdf\x67\x90\x2e\x53\x43\xaa\x6e\xb5" +
"\xe1\x56\x97\x8a\xed\x58\xdc\xdc\xd6\xfa\x10\xe8\x07\x7d\x41\x8f\xcc\x24\x09\xd3\xf1\xc1\xc3\xf5\xd5\xf9\xad\xe8" +
"\xaa\x59\x3f\xb9\xb3\x51\xaf\x73\x22\x59\x97\x9b\x9b\xe0\x5f\x65\xf1\xd6\xbc\x3c\xfa\x71\x5c\xfe\x35\xa5\xbd\x9d" +
"\x4a\xed\x39\xdb\xbb\xbb\xfb\x72\x35\x1e\xec\xe7\xd5\xcf\xe7\xba\x39\x0d\xed\x71\xd4\x0f\x4f\xd9\x63\x70\x74\x06" +
"\x5d\x7b\x2a\x7b\x8f\xa6\x63\xb6\xa2\xf4\xdb\x9c\x7e\x36\x7c\xad\x75\xdb\x91\x21\x9d\x90\x9f\x8f\xcf\xc4\x99\xba" +
"\xe7\xf1\x23\x0b\x9a\xb7\xa7\xd9\x68\xbf\x9f\x5c\x54\x6e\xbf\x05\xdf\x4c\xff\x61\x0c\xdd\xd3\x3c\xe6\x95\xe7\x77" +
"\x46\xae\x77\xc9\xd0\x34\x2d\x70\xbc\xaa\xa1\x47\xe6\x83\x84\x47\xe6\xbf\x0d\xff\x17\x00\x00\xff\xff\x03\x43\x00" +
"\x2b\x2c\x0e\x00\x00")
func bindataFrontendIndexhtmlBytes() ([]byte, error) {
return bindataRead(
_bindataFrontendIndexhtml,
"frontend/index.html",
)
}
func bindataFrontendIndexhtml() (*asset, error) {
bytes, err := bindataFrontendIndexhtmlBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{
name: "frontend/index.html",
size: 3628,
md5checksum: "",
mode: os.FileMode(436),
modTime: time.Unix(1, 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, &os.PathError{Op: "open", Path: name, Err: os.ErrNotExist}
}
//
// MustAsset is like Asset but panics when Asset would return an error.
// It simplifies safe initialization of global variables.
// nolint: deadcode
//
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, &os.PathError{Op: "open", Path: name, Err: os.ErrNotExist}
}
//
// AssetNames returns the names of the assets.
// nolint: deadcode
//
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){
"frontend/app.js": bindataFrontendAppjs,
"frontend/index.html": bindataFrontendIndexhtml,
}
//
// 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, &os.PathError{
Op: "open",
Path: name,
Err: os.ErrNotExist,
}
}
}
}
if node.Func != nil {
return nil, &os.PathError{
Op: "open",
Path: name,
Err: os.ErrNotExist,
}
}
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{Func: nil, Children: map[string]*bintree{
"frontend": {Func: nil, Children: map[string]*bintree{
"app.js": {Func: bindataFrontendAppjs, Children: map[string]*bintree{}},
"index.html": {Func: bindataFrontendIndexhtml, Children: 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
}
return os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
}
// 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, "/")...)...)
}