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