2017-08-13 01:57:08 +00:00
|
|
|
// Code generated by go-bindata.
|
|
|
|
// sources:
|
|
|
|
// static/archive.js
|
|
|
|
// static/style.css
|
|
|
|
// DO NOT EDIT!
|
|
|
|
|
|
|
|
package archive
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2017-12-10 00:04:00 +00:00
|
|
|
var _archiveJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x84\x56\x7f\x6f\xdb\x36\x10\xfd\xdb\x01\xf2\x1d\xae\x9c\x11\x49\x91\x23\xc9\x19\xda\x21\x76\xe4\xa0\xeb\xd2\x2d\x43\xda\x01\x4b\xfa\xcf\x4c\x35\x60\xa5\xb3\xa4\x46\xa6\x04\x92\x4e\x93\x76\xf9\xee\x03\xa9\x5f\x76\x1c\x67\x70\x2b\x3b\xe2\xe3\x7b\x77\x8f\xe4\x1d\xfd\x43\x60\x22\xce\xf2\x3b\xf4\xbe\x4a\x38\xf4\x61\x7f\x6f\x7f\xef\x8e\x09\x60\x85\x40\x96\x3c\x5c\x96\x2c\xc1\x04\x42\x58\xb0\x42\xe2\xb4\x1d\x1d\xc6\x19\x53\x6f\x05\x32\x08\x21\x29\xe3\xd5\x12\xb9\xf2\x52\x54\xe7\x05\xea\x9f\xbf\x3e\x5c\x24\x36\xd1\x18\x26\x90\x11\x67\x5a\xcf\xfa\xed\xfc\xfd\xdb\x4f\x97\xd7\x37\xef\xff\xfa\x78\x7d\x73\x75\xf1\xcf\x39\x84\x30\x3e\x36\xa4\x8b\x15\x8f\x55\x5e\x72\x88\xcb\xf2\x36\xc7\x1b\x89\xca\xbe\xc5\x87\x11\xdc\xb1\x62\x85\x0e\xfc\xd8\xdf\x1b\x74\x42\x35\x06\x42\xd0\x10\x97\x84\xc4\x35\x28\x97\x4c\x01\xef\xab\x5c\xa0\x0c\xaf\x98\x1a\xc1\x71\x00\x57\x58\xc1\x71\xf0\xfa\x04\x82\x93\x49\xf0\x7a\x32\x3e\x9e\x42\xc5\x54\x16\xfa\x26\xa8\xc7\xe7\xa4\xe3\x02\x99\xd0\xcc\xff\xa3\xda\x8b\x5d\x67\xab\x11\x04\x63\xf8\x93\x71\x18\x9f\xfc\x12\x40\x10\x4c\xcc\x3f\xf8\x74\xfd\x6e\x4d\x10\x76\x28\xa6\x75\xb2\xb5\x9e\x36\xaa\x62\x42\xc9\x75\x6b\x6b\xa0\x27\xab\x22\x57\x36\x99\x02\x71\xbc\x25\xab\xec\x96\xc8\xbe\x77\xe0\x07\x08\x54\x2b\xc1\xe1\xbe\x85\x85\x5a\xf2\x51\xe7\x39\x58\x94\x02\x6c\xcd\x9c\x43\x08\xc1\x08\x74\x1a\x46\xc4\x2b\x90\xa7\x2a\x9b\x42\x0e\xaf\xc2\x10\x70\x0a\xae\x9b\xd7\x81\x0c\xf2\x05\xd8\x06\x34\xcf\xa3\x79\x10\x41\x18\x42\x17\xe5\x60\xd0\xa8\x75\x80\x71\xa4\x85\x06\x8f\xfb\x7b\xe6\x7f\x33\xcc\x57\x45\xb1\x65\x74\x96\xa7\x59\x91\xa7\x99\xb2\xa5\x12\x0e\xfc\x18\x34\x69\xaf\x44\x91\xa0\x8c\xf5\x6e\x6b\x13\x93\x8d\x5c\x43\x97\x60\x5c\x26\xf8\xe9\xef\x8b\x77\xe5\xb2\x2a\x39\x72\x65\x4b\x4f\x60\x55\xb0\x18\x6d\x9f\xba\x7e\x3a\x02\x02\xc4\x31\x49\x3f\xea\x47\x1f\x8a\x54\x42\xff\x35\xe8\xf1\x36\x9d\xd3\xa4\xfe\x1c\x75\x0f\x2a\xcd\x73\xb2\xf6\x8c\xc0\xb1\xe9\xa1\xe7\x3a\x86\x7e\x38\x3e\x95\x15\xe3\x10\x17\x4c\xca\x90\x12\xf9\x20\x29\x99\x0d\x8f\x4f\x7d\xfd\x7a\x46\x9c\x0d\x11\xe3\x95\x4f\xe7\xf6\xb6\x92\x43\xa5\xdd\xab\x38\x74\x62\xd7\xdf\x91\x9f\x8e\xcc\x34\x6b\x5d\x88\xa8\x7c\x89\x52\xb1\x65\x45\x66\xf3\xcd\x01\x79\x63\x56\xfc\x26\x21\xb3\xe1\x18\x9a\x38\x9e\x87\x64\xcb\xb5\x50\x9f\x87\x48\x32\x9b\x0c\x7f\x6e\x20\x51\xf3\x6d\xe9\x80\x9c\x2d\xfb\xe6\xc1\xd1\xc9\x84\x1e\x51\x19\x1d\x9e\xd1\xc8\xf8\xb3\x33\xe8\xe1\xb8\xe5\xda\xe2\x39\x28\x14\x9d\xce\x3f\x53\x19\xb9\x67\xf4\x20\x55\x74\x5a\x5b\xbd\x69\xb4\xae\x27\x74\x8d\x87\x6c\xf1\x1c\xea\x4f\xbb\x4e\xcf\xae\xd2\xee\xb9\x46\x36\x5f\x56\xf3\xcf\x94\x53\x41\x4f\xa3\xc3\xe7\x68\xd2\x97\x23\xc8\x94\xaa\xe4\xd9\x84\xfa\xd4\xf7\xdc\x33\xc7\x9e\x53\xf9\xef\x69\xd4\x10\x31\xc8\x04\x2e\x42\x4a\x86\x63\x4a\x40\x60\x11\x52\xc2\x4b\x81\x0b\x14\x02\x45\xc3\xcb\x66\xc3\xe3\xa7\xb4\x4b\x96\x72\x54\x13\x7a\xe6\xb9\x09\x0f\xed\xf9\x67\x7a\x0a\x51\x9d\x65\x77\x50\x96\x4c\xc5\xd9\x08\x96\xe3\x27\xe7\x73\x4d\x96\x80\x0b\x06\x06\x2e\x10\x4a\x66\xf3\x0f\x6f\x7f\xff\x78\x7e\x1d\x81\x1e\x68\xce\x9e\xad\x09\x5c\x20\x3a\x10\x52\x1f\x68\x1d\xcc\xd6\x11\x5e\x94\x5c\x5d\xe5\xdf\xd1\x8e\x33\xc6\x53\xec\x4b\x57\xbc\x12\xfa\x3d\x84\xeb\xc5\x8d\x68\xb8\xcc\xbf\xa3\xa9\xba\xa6\xb0\x74\xb8\x30\x34\x45\xa2\x09\xbb\x9f\xbe\xd5\x2c\xcc\x91\x06\x2c\x24\x3e\x85\xba\xad\xea\xb4\x29\x3e\xfb\x7b\xdd\xa8\x1b\x42\x1d\x62\x53\x0c\xd6\xfa\x4b\x1f\xd5\xa8\x25\x70\x1a\x54\xd7\xdf\x3c\xa9\x1e\x0a\x9c\x93\x36\x5f\x12\x41\x08\x84\xb8\x0d\xde\x25\xd5\x3d\xd9\x32\x47\x95\x69\x5a\xe0\x07\xe4\x2b\xbb\x37\x66\x18\x97\x5c\xb1\x9c\xa3\x78\xa9\x67\x2e\x91\xaf\x8e\x3a\x64\x6d\x57\x3f\xb3\x8e\xc6\x4b\x72\x59\x15\xec\x41\xb7\xa2\xdd\x63\x21\x58\x5f\x8a\x32\xbe\xb5\x1c\x38\x03\x8b\x97\x1c\x2d\x98\xb4\xef\x76\x97\xe4\xcb\x9c\xa3\xcd\xcb\x3e\xee\x22\xe7\xa8\x7b\x51\x6f\x49\xce\x39\x8a\x3f\xae\x3f\x5c\x36\x8d\xc6\x3a\xfd\x22\x66\x56\x6b\x9d\xc1\xcf\x79\xa9\x8d\xda\xac\x05\x7a\xe4\xa8\x13\xc2\x84\xcc\x2c\x70\xa1\xc7\xbb\x60\xb5\x15\x62\x6b\x19\x3a\x4d\x08\xeb\x19\xde\xd7\x32\xe7\x6b\xd2\x9b\xe9\x94\x5c\x5f\x5c\x1a\xf7\x9b\x1d\xb7\x71\xa3\xd9\x68\x2b\x66\xdb\x68\xd8\xd3\x4b\x8f\x12\xab\x
|
2017-08-13 01:57:08 +00:00
|
|
|
|
|
|
|
func archiveJsBytes() ([]byte, error) {
|
|
|
|
return bindataRead(
|
|
|
|
_archiveJs,
|
|
|
|
"archive.js",
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
func archiveJs() (*asset, error) {
|
|
|
|
bytes, err := archiveJsBytes()
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
|
2017-12-10 00:04:00 +00:00
|
|
|
info := bindataFileInfo{name: "archive.js", size: 2803, mode: os.FileMode(488), modTime: time.Unix(1512862455, 0)}
|
2017-08-13 01:57:08 +00:00
|
|
|
a := &asset{bytes: bytes, info: info}
|
|
|
|
return a, nil
|
|
|
|
}
|
|
|
|
|
2017-12-10 00:37:38 +00:00
|
|
|
var _styleCss = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x57\x4b\x6f\xdb\xb8\x13\x3f\xdb\x80\xbf\xc3\xa0\xbe\xfc\xff\x41\x64\xcb\x6e\xda\x26\xf2\x65\xdb\x3c\xb0\xc5\xb6\xdb\x05\xda\x9e\x0b\x4a\x1a\x4b\x44\x28\x52\x4b\x52\x7e\xa4\xf0\x77\x5f\xf0\x21\x89\x52\xe3\xa2\xd8\xc3\xfa\xe0\x58\xd4\x6f\xde\x33\xbf\x61\x96\x17\x40\x64\x56\xd2\x1d\x2e\x95\x3e\x32\x5c\x64\x4a\xc1\xc5\x72\x36\x9d\x4d\x97\x17\xf0\x17\x29\x10\xec\xb9\x3f\x2b\x75\xc5\xe0\xfb\x6c\x3a\x11\x3b\x94\x5b\x26\xf6\xd1\x31\x51\x99\x14\x8c\x6d\x66\xd3\x53\x8b\xb8\x4c\x45\x7e\xb4\xb0\x8a\xc8\x82\xf2\x24\xde\xd4\x24\xcf\x29\x2f\x92\x78\x93\x0a\x99\xa3\x4c\xe2\xcd\x6c\x3a\xd9\x0a\xae\xa3\x2d\xa9\x28\x3b\x26\x2f\x3e\x63\x21\x10\xbe\xbe\x7f\x71\xf9\x56\x52\xc2\x2e\x15\xe1\x2a\x52\x28\xe9\xb6\x83\x2a\xfa\x84\xc9\x6a\x5d\x1f\x5a\x6b\xc4\x5a\xc9\x04\x13\x32\x81\x94\x35\x68\xa0\x59\x23\x95\x79\xae\x05\xe5\x1a\x65\x8b\x6d\xd8\xd0\xa5\xd9\x74\xe2\xbd\x8a\x18\x6e\x75\xb2\x8e\x7b\xbd\x8b\x8a\x72\x1a\x29\xac\x89\x24\x5a\x48\x2b\x98\x53\x55\x33\x72\x4c\x80\x72\x46\x39\x46\x29\x13\xd9\xa3\xd1\xf2\x24\x44\x95\xc0\xca\xfc\x2c\x91\x16\xa5\x4e\x60\xf5\xda\xea\x9a\xec\x69\xae\xcb\x04\x9c\xe6\x89\x0b\xdd\x59\x83\x55\x7d\x00\x25\x18\xcd\x21\x27\xf2\xb1\x90\x78\x0c\x20\xd2\xab\xe9\x30\xf3\xbb\xbb\xbb\xd6\x39\x85\x0c\x33\x3d\x0e\xe6\xe4\x6b\xf6\x81\x1c\x45\xa3\x7d\xbd\x16\xcc\x3e\x45\x5a\xd4\x16\x5f\x0b\x45\x35\x15\x3c\x81\x2d\x3d\x60\x6e\x2c\x6a\x51\x27\x60\xb3\xe1\xfc\xb2\x3f\xbd\xfd\x38\x8c\x69\xed\xf2\xde\x26\x2d\x81\x97\xee\xd9\xf9\x10\xa5\x42\x6b\x93\x87\xeb\x20\x8b\xde\xfa\xa8\x1d\x8c\x37\xc9\x55\x3c\xd4\xf6\xf2\x47\xb1\xba\x51\x65\x2e\xf6\x7c\xe8\xb9\x44\x46\x34\xdd\x61\xeb\x7b\x20\xb8\xbc\x80\xdb\x92\x68\xdb\xb1\x94\x17\x3e\x07\xf3\xac\x24\x9a\x48\x74\xbd\xb2\x17\x32\x8f\x52\x89\xe4\x31\xb1\xdf\x91\x39\xe8\x2c\x6b\x5a\xa1\xd2\xa4\xaa\xc3\xbe\x9a\xbf\x7b\xf7\xae\x43\x18\x65\xf6\xa5\x6d\xc8\xbd\xcb\x4d\x2a\x98\xcd\xa5\x17\x30\x05\xf5\xcd\x78\x9a\x4d\x21\xf8\xcc\xa6\x0b\x75\x54\xbd\xbc\x9d\xad\x84\x6a\xc2\x68\x36\x52\x50\x48\x44\xde\x99\x2d\x74\xe0\xd1\x3c\x7e\xdb\x8f\xcf\xd0\x05\x9f\x40\xd3\x9f\x25\x2d\x4a\x66\xde\x61\x6e\x65\x53\x92\x3d\x16\x52\x34\x3c\x4f\xec\xf1\x11\x19\x13\xfb\x20\x77\x5f\x84\x60\x29\x91\xa3\xf4\x2d\x6a\x92\x0f\xfa\xdf\xb5\x7f\x58\xbb\x78\x50\x74\x4e\x76\xf0\xbd\x0d\x37\xb4\xda\x36\xf1\x24\x15\x87\x48\x95\x24\x17\x7b\x3b\x1a\x70\x55\x1f\x60\x6d\xbe\xe6\xb7\xb7\xb7\x06\x30\x98\xf7\x78\x03\xcb\x0b\x90\x58\x89\x1d\x42\x5d\x12\xae\x45\x05\xaa\x26\x19\x2a\x48\x51\xef\x11\x39\x20\xc3\x0a\xb9\x76\xd4\x75\xf2\x4e\x6c\x85\xac\x9e\x9b\xdc\x81\xa7\xe4\x12\xec\xdf\x45\xd6\x48\x89\x5c\x47\x35\x29\xd0\x9f\x05\x83\xd6\xbb\x03\x9e\x7f\x26\x2e\xc9\xed\xc0\xaf\x47\x19\x58\xa4\x9a\x8f\xd3\x0e\xfb\x92\x6a\xec\xeb\x9c\x32\xe2\x18\xc4\x73\x62\x30\xef\xb6\x42\x2d\x29\x74\x13\x17\x83\xe7\x15\x8d\x07\x1d\xe5\x98\x09\x49\xec\x50\x70\x31\x0e\x2b\x29\x0d\x45\x3b\x0f\x1c\xa7\xf8\xde\x32\x4a\xc1\x5a\xf6\xdf\xde\x8a\x93\x35\x73\x12\x29\x34\x3b\xc1\xc5\xcd\x04\xd1\x89\xa5\x83\x16\x33\x77\xaf\x53\x71\x70\x03\x65\x29\x6e\xf5\x26\x60\xcf\x39\x13\x85\x70\xfd\xea\xa8\xb8\x67\xe2\xc9\x0f\x8d\xd4\xf3\xa8\xd7\xe4\x43\xf4\x99\x6d\x1f\x3d\x75\x38\xa6\x1e\x1c\x39\xae\xba\x1a\xd0\xc0\x57\x4d\x19\xd5\x47\xc8\x18\xe9\xf6\xd9\x82\x8b\xbe\xa0\x00\xd1\x1e\xd3\x47\x6a\xa8\xb1\xc9\xca\x28\x23\x8c\x89\x46\x27\x60\x33\x69\x1a\x8e\x7e\xfa\x0c\x9f\xc9\x96\x48\x6a\xe5\x4d\x3b\xb7\x22\x8d\x42\x19\x39\x5d\x81\xc0\x08\x0c\xd1\xa3\xd9\x85\x67\xc0\x7f\x08\xfe\x77\x83\x52\x48\xf8\xfd\xcb\xc7\x0f\xbd\x10\x40\x54\x89\xa7\x33\x42\x0f\x54\xe2\x56\x1c\x42\x34\x44\x95\x3a\x83\x7e\x6f\x52\xce\x51\xc3\xfd\xa1\x66\x42\xa2\x5c\xde\xe7\x05\x0e\x84\xcd\xe7\x79\xe1\x3f\x05\x8f\x6a\x89\x76\x4b\xc0\x0e\xa5\xa2\x82\x5f\x82\x9f\x11\x76\x1c\xaa\x78\xfe\xa3\x9a\xba\x16\xd2\xb0\x4f\x7a\x84\xdb\x52\x8a\x0a\x81\xf0\x1c\x3e\xd5\x28\x49\x3b\xa8\xb6\x5a\x77\x52\xd4\x96\xe8\x3d\x61\x57\xc8\x9b\x28\x13\x5c\x13\xca\x71\xb8\x7c\x3b\x07\x73\xdc\x92\x86\xe9\x5e\xcf\x22\xcf\x8d\xdc\x00\xdd\xb5\x56\xb7\x3d\x48\xaa\x04\x6b\x74\xb7\x3d\xd6\xd7\x7e\x98\x4d\x5f\xc5\xe1\xd2\x5e\x5d\x0f\xb7\xb6\x41\x07\xfb\xf8\xe6\xe6\xe6\x97\xa8\xec\x29\xa2\x3c\xc
|
2017-08-13 01:57:08 +00:00
|
|
|
|
|
|
|
func styleCssBytes() ([]byte, error) {
|
|
|
|
return bindataRead(
|
|
|
|
_styleCss,
|
|
|
|
"style.css",
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
func styleCss() (*asset, error) {
|
|
|
|
bytes, err := styleCssBytes()
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
|
2017-12-10 00:37:38 +00:00
|
|
|
info := bindataFileInfo{name: "style.css", size: 3790, mode: os.FileMode(420), modTime: time.Unix(1512866199, 0)}
|
2017-08-13 01:57:08 +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){
|
|
|
|
"archive.js": archiveJs,
|
|
|
|
"style.css": styleCss,
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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{
|
|
|
|
"archive.js": &bintree{archiveJs, map[string]*bintree{}},
|
|
|
|
"style.css": &bintree{styleCss, 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, "/")...)...)
|
|
|
|
}
|
|
|
|
|