You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

293 lines
21 KiB

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