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