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