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