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