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