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