mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-14 15:07:26 +01:00
210 lines
13 KiB
Go
210 lines
13 KiB
Go
package assets
|
|
|
|
import (
|
|
"fmt"
|
|
"io/ioutil"
|
|
"os"
|
|
"path"
|
|
"path/filepath"
|
|
"reflect"
|
|
"strings"
|
|
"time"
|
|
"unsafe"
|
|
)
|
|
|
|
func bindata_read(data, name string) ([]byte, error) {
|
|
var empty [0]byte
|
|
sx := (*reflect.StringHeader)(unsafe.Pointer(&data))
|
|
b := empty[:]
|
|
bx := (*reflect.SliceHeader)(unsafe.Pointer(&b))
|
|
bx.Data = sx.Data
|
|
bx.Len = len(data)
|
|
bx.Cap = bx.Len
|
|
return b, nil
|
|
}
|
|
|
|
type asset struct {
|
|
bytes []byte
|
|
info os.FileInfo
|
|
}
|
|
|
|
type bindata_file_info struct {
|
|
name string
|
|
size int64
|
|
mode os.FileMode
|
|
modTime time.Time
|
|
}
|
|
|
|
func (fi bindata_file_info) Name() string {
|
|
return fi.name
|
|
}
|
|
func (fi bindata_file_info) Size() int64 {
|
|
return fi.size
|
|
}
|
|
func (fi bindata_file_info) Mode() os.FileMode {
|
|
return fi.mode
|
|
}
|
|
func (fi bindata_file_info) ModTime() time.Time {
|
|
return fi.modTime
|
|
}
|
|
func (fi bindata_file_info) IsDir() bool {
|
|
return false
|
|
}
|
|
func (fi bindata_file_info) Sys() interface{} {
|
|
return nil
|
|
}
|
|
|
|
var _text_png = "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\x00\x00\xc0\x00\x00\x00\x80\x08\x03\x00\x00\x00\x6a\x5a\x96\x59\x00\x00\x00\x06\x50\x4c\x54\x45\x00\x00\x00\xff\xff\xff\xa5\xd9\x9f\xdd\x00\x00\x00\x01\x74\x52\x4e\x53\x00\x40\xe6\xd8\x66\x00\x00\x07\xb2\x49\x44\x41\x54\x78\x9c\xec\x1c\x89\x76\x23\x21\x08\xf2\xe6\xff\x7f\x99\x4d\x54\xe4\xf4\x98\x34\x6d\x8e\x0d\xbb\xb5\x13\x83\x1c\xe2\x01\x8c\xf6\x02\x6f\x0e\x5f\x05\x6e\x80\x83\x9a\x58\x3f\x6a\x1b\xf1\x77\xda\xde\xe0\x02\x78\x05\x69\x75\xfd\x87\xf5\xa1\xd4\xb7\xb2\x7d\x8b\x86\x3c\xb6\xf2\xb9\x60\x2c\x80\x74\xfb\xd7\x3e\xd0\x15\x4a\x29\xdf\x92\xd5\xe0\x2f\x60\xd0\x47\xd2\x97\x87\xae\x2e\xf2\xa3\xb2\x67\x11\x9e\x7c\x63\xaa\xa8\xfb\x12\x44\x1a\xbb\x90\xf0\xba\x7d\xb8\xfe\x70\xdd\x61\xeb\xd9\x06\xa8\x78\x32\xea\x55\x35\x45\xa8\x59\x63\xa9\xc7\xbd\xa2\x6b\xea\x59\x6f\x71\x0d\x2b\x80\x37\xe4\x66\x01\x43\xa2\x97\x54\xdb\xe0\xed\x7f\xed\x17\x7e\xda\x91\xc4\x30\xdd\x05\x19\xce\x4d\xac\x52\xa2\xeb\x5a\x33\x59\x71\x63\x70\x8f\xd6\x9c\x58\xf3\xe3\x55\x08\xd5\x07\x94\xaa\xb6\xee\x94\xb2\x59\x80\xca\x98\x51\x16\x50\x1a\x73\x69\xd8\x52\xa7\x4f\x9d\x79\xaf\x23\x25\x11\x05\x61\x29\xd3\x00\x9a\x6d\x1b\xf4\x51\x4b\xc2\xad\xe3\x50\xab\x26\x65\x01\x51\x52\x9e\x9d\xea\x29\xd7\xb8\x72\x9f\x5d\xcb\x47\xad\x10\x94\x00\x00\x76\xd5\x56\xe8\x7d\x12\xb7\xe9\x2e\xeb\x68\xed\x4a\xb7\x22\x3d\x02\x4e\xcd\x07\x62\x54\x4c\x46\xc0\x0d\x0e\x5b\xad\xf7\x81\x56\xde\x2a\xc8\xb1\xff\x91\x32\xfb\x8d\x93\x01\xcc\xca\xf4\xe5\x23\xd9\x07\x1c\x03\x57\x61\xec\xf3\x03\xd8\xb1\x03\xd9\x92\x54\x7d\xde\x70\x6f\x15\x9a\x8b\xf4\xe0\x39\xf0\xf9\xf0\x75\xa7\x9f\x0d\x1f\xa6\xc0\x62\x0e\x87\xcd\xe5\x05\xc0\x78\xa3\xfd\xb1\x7c\x90\xc2\x3a\x6d\x67\xdc\xe9\xb2\x62\x83\x50\xeb\x7b\x23\x55\xa2\xc9\x33\xb2\x2b\x12\x19\xf4\x3d\xb6\xfe\xc6\xb8\x41\xa1\x0e\xb5\xd8\xbd\x13\x2f\x25\x3a\x5e\x2b\x43\x48\xfb\xc4\x45\x41\x63\x53\x08\x02\x44\x62\x4e\xd8\xdb\x4f\x32\x07\x9a\x57\x7a\xf5\xed\x8a\x7b\xe7\x09\x75\x1f\x1d\x9c\xdf\x94\xc9\x4f\xfe\x41\x3e\x1a\x93\xe7\x68\xae\xb3\xe4\x4b\xe5\xf3\x5b\x05\xa8\x6e\x72\xa4\x37\xbd\x12\x27\x60\x1a\x9b\x11\xae\x03\x1a\x50\xa6\x4e\xe4\x54\x8e\x71\x42\xd3\x18\x84\x2a\x62\x41\xa5\x38\xc4\x50\x3f\x2a\xa2\x5c\xa0\x47\x34\xde\x39\x8a\x3c\x49\xe8\xaf\xac\xd4\x29\xeb\xf1\x93\x79\xc0\x59\x4d\x90\x17\x9d\x2f\x64\xa0\xba\x45\x6d\x26\x0f\x3a\xba\x8e\x34\xd5\x65\x09\x5a\x08\x68\x81\x92\xb1\xa2\x51\x8a\xcd\x35\x3d\x59\x35\xba\x63\xa7\x56\x98\x48\xa1\x47\x08\x08\xbd\xab\xdc\x04\x82\x56\x39\x70\xd2\xc1\x18\x4f\x70\xf4\x64\xed\x09\x9b\xb8\x50\xf8\x7e\x9f\xf9\x4b\xc9\x24\xae\x73\x00\x7b\xef\x3a\xe3\xa9\x68\x9e\x9d\xf5\xb6\xd4\x6a\x25\xd3\x79\xad\xe2\xb8\x92\xaf\x99\xce\x9f\x9a\x5b\x10\x0d\xf5\xcc\x45\x3b\xa7\xbc\x7e\x68\xba\xab\xad\x78\xde\x04\x51\x42\xdf\x43\xdc\x1e\xfd\x6c\xe1\x69\x22\x33\x4d\x82\x42\xa9\x49\x78\x8d\x7e\x9f\x85\x7c\xe5\x9c\x2c\xdb\x3f\x84\x87\x11\x7a\x49\xf8\x30\x67\xee\x0d\xe1\xab\xc0\xb3\x61\xbc\x13\xbf\x0e\x68\xbf\x07\xd5\x46\x5c\xe0\xd0\x55\xc5\x4d\x6a\x48\x28\x19\x42\xce\xcc\x20\xa7\x89\xc4\xcb\x67\x37\x03\x55\x12\x90\x6b\x3a\x1d\x4d\xd3\x3c\x03\x69\x7c\x95\x1b\xe7\xb2\xf2\xd5\x22\x53\x73\xec\x4c\xb6\xd1\xfd\xf4\x12\xe3\x56\xee\x1d\xaf\x80\x89\xed\x3f\xa0\xa7\x06\xde\xd7\x8f\x1c\x31\xe0\x58\x17\x43\x57\xf0\xe7\x4b\xdb\xf4\x9c\xc7\x40\xd2\xf3\x10\xea\x03\x18\x4f\x9d\xf2\x96\x3b\x74\x1a\xd3\xea\xcc\xb9\xbc\xae\x26\x49\x8a\xc2\x65\x4a\x6d\x0f\x8c\x53\x48\x81\xdd\xef\x82\x9d\xc4\x98\x85\x09\x12\xa1\xca\xe0\x5d\x02\x61\x46\x13\x6b\x12\xdf\x73\x31\x09\x4d\xd2\x31\x77\xb0\xed\x48\x01\x0e\x22\xc1\xfb\xd8\xc6\xed\x33\x53\x5b\xc8\xcf\x03\x7c\xb2\x92\xc2\x56\x3c\x60\x19\xcc\xe0\x02\x6d\xf1\xa1\x1f\x0c\xa4\xfd\x01\x33\xc3\x4c\x12\xcb\x1b\x6d\x2f\xb9\xec\x75\xe2\x6f\xeb\x74\x4a\x83\x04\xd7\x76\x3a\x39\x0b\x4f\xe1\xa0\xd1\x18\x45\x1e\xf6\xf2\xbe\x47\xb5\xe3\xb5\xc2\xb4\xb5\x43\x5b\x7f\xbb\xf3\x9c\x80\xa5\x99\x1a\xe8\xef\x7c\xed\x7d\x7b\x86\x96\xb2\x69\xea\x25\x81\xb7\xb9\x3f\x03\xfc\xec\xc0\xe4\x5e\x78\x7b\x6f\xf4\xab\xc0\xb3\xe1\x72\xef\x3a\x84\xe6\xd7\x2f\x83\xe4\xb6\x13\x7e\x98\x3e\x86\xaf\xc6\xb9\x18\x74\x18\xbb\x42\x9d\x45\x55\xa5\xca\x53\x5d\xf6\x76\x51\x5c\x7b\x1a\x7f\xb8\x22\xab\xe3\x42\x6f\x11\x52\x06\xd0\x49\xc9\xa3\x67\x36\xc5\x6d\xd6\x2e\x67\xe2\x2c\xa0\x38\x1a\xfd\x17\x19\x14\x24\x4c\xc2\xc8\x7a\xea\x47\xea\xb1\x07\xa8\xab\x90\x72\x13\x26\x41\xa0\xce\x24\xdb\x90\xae\x07\x8f\xa0\x03\xc3\x51\x48\xa9\xea\x25\x50\xb4\x21\x65\x8f\x51\x3b\x02\xda\xf5\xc2\xcd\xb5\x03\xcc\xb7\x0c\xa6\xd7\xcd\x1b\x80\xc9\xbb\xb7\xa4\x79\xac\xdf\x0c\x68\x14\x69\xc3\x3d\x30\x3b\xa4\x3a\x9d\xcc\x3b\x06\xdc\x3e\x00\x28\x34\x37\x5b\x6c\xa0\x0d\x26\x71\xa6\xf3\x78\xb9\x9a\x6a\xd0\x5d\xf4\x48\xbb\xbf\x74\x29\x04\xf4\x04\xa0\xed\x80\xe4\x30\xc2\xa9\x78\x40\x4e\x9b\x89\x71\x4d\x72\x43\x53\xa7\xec\x8d\x4f\x6b\x4b\xbe\x2d\xd7\x63\xe5\xe2\x4f\x19\xd6\x57\xa3\xd4\xe7\xc9\xe3\x96\x67\x9d\x8d\x31\x95\xcb\x56\x9b\xa8\x63\x5e\x93\x9d\xf8\x24\x55\x9a\x57\x64\x8d\xce\x44\xe8\xe7\x48\x7f\x06\x7c\x80\x37\xfa\xe6\xf0\x55\xe0\xd9\xf0\x55\xe0\xd9\xf0\x55\xe0\xd9\xf0\x55\xe0\xd9\xf0\x55\xe0\xd9\xf0\x55\xe0\xd9\xf0\x55\xe0\xd9\xf0\x55\xe0\xd9\xf0\xbf\x28\xc0\x49\xed\x3b\x00\x43\x76\x01\xcd\x99\xca\x47\x71\x34\x39\x78\xd4\xb5\xea\xa7\x66\x2a\xfb\xdd\x4b\x39\xb4\xed\x72\x3b\xfd\x7e\xa6\x64\x41\x01\xd4\x33\xba\x36\xe6\xc4\xb5\x88\x60\x9a\x9b\xd7\x03\xc3\x1e\x40\xc3\x27\x28\x00\x5e\xb1\x28\x0b\x38\x6c\xb4\x28\x69\x72\x07\xd1\xbf\xbf\x37\x29\x60\x65\x8c\xbc\xc3\x2c\x25\x93\x37\x06\x7d\x8a\x17\x23\xa6\x9c\xb2\x4e\xe8\xf0\xb3\x62\x99\xf3\x8f\x0a\x18\x9b\x6b\xee\x63\x32\x2c\x88\x98\x59\xcb\x16\xc4\x4c\x94\x34\xc4\xa2\x88\x88\xd1\xc0\x4c\x17\xe3\x9d\x0d\xdd\xed\xde\xe0\xfa\x43\x48\xee\xf2\xab\x07\x68\x77\x34\x50\x5d\xa6\xf4\x49\x5c\x4e\xc1\xf6\xdc\x76\xa9\x48\xd2\xa4\xfc\x2a\x03\x38\x1f\xea\xb9\xb2\xda\xa1\x59\x63\xab\xef\xf3\x94\x8b\x94\x18\x52\xdc\xae\xbb\x33\xcb\xc5\x13\xe0\x00\xa6\x1e\x43\x0d\xa4\x0d\x3c\x57\x48\x2c\x50\xbe\xb5\xa3\x40\x9b\xa3\x9b\x71\xf2\x8e\xac\x0f\x10\x39\x5a\xa2\x93\xee\xfd\xe4\xe1\xf2\xa0\x4f\x6d\x3c\xfd\x12\x53\x1c\x3e\xe2\xc1\xb7\x30\x7a\x5d\x3f\xe1\xa7\x2f\xb3\x94\xa2\x2d\x8e\xe0\xd7\x9e\xd8\xc5\x10\x66\x84\xfd\x38\x5a\x27\x02\x66\xbe\x0c\x78\x72\xdd\x1c\xd0\x17\x8f\xda\xce\x5a\x40\x4e\x7c\x52\x3b\x1b\xa6\xe9\x50\x20\x6a\xda\x0d\xbf\xe5\x8a\xcc\x08\xe1\xfd\x80\x67\x04\xea\xc4\x68\x7d\x1f\xc2\xb7\x5e\x16\x67\x8d\x12\x01\x7e\xe1\xbc\x4c\x46\xf1\xf1\x5c\x7e\x11\x12\x61\xdf\x4a\xfe\x07\xc0\xff\xe2\x8d\xbe\x2e\x7c\x82\x02\x7a\x8d\xe7\x2b\x50\xe8\xf6\x3f\x0d\x11\xdf\xf8\x7a\xa1\x1e\x00\xfc\x5e\x3b\xe0\xa5\x39\x0c\xa9\x61\xb2\x63\xeb\x82\xcf\x3a\x80\xf2\x68\x93\xfb\x5f\xda\x2f\x43\x98\xd4\xb3\x17\x97\xb7\xc5\x4c\xd5\x29\x97\xfd\x4d\x12\x40\xb3\xb9\xa3\xa9\xa6\x70\x0e\x7d\x85\xef\xfe\x38\x8c\x3e\x27\x1e\x4a\xe7\x3a\xf6\x9b\x17\xa1\x04\xcc\x0e\xec\xf4\x63\x38\xbc\xc3\xe7\x38\x08\x72\x37\xa4\x38\x3a\xf6\x18\x8e\x2f\x41\x3d\xaf\x0f\x3c\xe5\x1e\x56\x52\xaa\x63\xf3\xe6\x08\x7d\xd7\x60\x21\xd6\x96\x4f\x18\xe0\xd2\x3c\xbb\x45\x79\xbf\x1b\x11\x6f\x72\x0e\x61\xc7\xa7\x35\xd7\xa5\x6f\xf7\xb4\xf7\x8e\x9c\x91\x75\x5b\xc7\x43\x65\xdc\x74\x43\x83\x7d\x0b\x20\x1f\x23\xb9\x0e\xa1\x1a\x73\xcd\x4b\x2b\xd1\xa0\x5c\xc1\x52\x83\x76\x4e\x65\x45\xc5\xb9\xc9\xc7\x64\x56\x49\xa9\x99\xfc\x1a\x34\xc9\x4e\xb2\xd8\x3d\xb5\x58\xfe\x30\x94\x1c\xdf\x4b\xcb\x16\xf6\xda\x92\x23\xec\x22\x22\xda\xf3\x48\xb6\x64\x1c\x5c\xe2\x74\x99\xce\x9e\x68\xf9\x0b\x4f\x77\x9f\xc7\x79\x69\x5e\xcc\x53\x7f\x31\x71\xee\x85\x4f\xf0\x46\xdf\x1b\x3e\x41\x81\x5f\x8e\x07\x9a\x73\x7c\x26\x1e\x98\x71\xd1\x8e\xb7\x45\x6a\x45\x16\x0f\x64\xb4\x77\xe3\x01\x68\xa9\xdb\xed\x78\x60\xc1\x05\x21\x2a\x30\x85\x9f\x26\x83\xc2\xab\x8b\x19\xee\x83\xf1\x1e\x05\xdb\xfc\x70\xb3\x81\xfe\xfe\x58\x3b\x42\xe9\x1f\x8f\xca\xca\x9a\xf9\x8b\x25\x80\xb9\x51\x30\xf6\x67\xa9\x49\xe7\xef\x15\xf8\x12\x4c\x00\xd4\x35\x9a\x95\x12\x56\x8e\xca\x71\x4b\x80\xc9\x8d\x02\x5d\x72\xca\x16\x97\x98\xaa\x3c\x36\xa4\x57\x33\x99\xc6\x98\x73\xd8\xf0\xba\x24\xfc\x3c\x33\xc6\x8f\xd4\x85\x74\xa5\xf1\xd3\xef\x8d\x07\x36\xe0\x1e\x67\xfd\xe4\x25\xa0\x69\x02\xe0\x31\xc0\xa4\x52\x4b\xfb\x6b\x02\x3c\x94\x72\xff\xbe\x97\x9b\x93\x78\x9d\x71\x58\x4c\x62\x11\x0e\xb0\xfd\x81\x35\x5f\x02\x9c\xbd\xb3\x6e\x3a\xe7\x64\x67\xde\x03\x73\x1e\x7a\xd7\xc3\x25\xf6\x39\xda\x7f\x03\xa8\xff\xbc\xde\x47\xdc\x50\xfe\x17\x00\x00\xff\xff\x21\x6f\x30\xc6\x16\x3a\x34\xa9\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82"
|
|
|
|
func text_png_bytes() ([]byte, error) {
|
|
return bindata_read(
|
|
_text_png,
|
|
"text.png",
|
|
)
|
|
}
|
|
|
|
func text_png() (*asset, error) {
|
|
bytes, err := text_png_bytes()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
info := bindata_file_info{name: "text.png", size: 2058, mode: os.FileMode(420), modTime: time.Unix(1419689280, 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)
|
|
}
|
|
|
|
// 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){
|
|
"text.png": text_png,
|
|
}
|
|
|
|
// 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 name := range node.Children {
|
|
rv = append(rv, name)
|
|
}
|
|
return rv, nil
|
|
}
|
|
|
|
type _bintree_t struct {
|
|
Func func() (*asset, error)
|
|
Children map[string]*_bintree_t
|
|
}
|
|
|
|
var _bintree = &_bintree_t{nil, map[string]*_bintree_t{
|
|
"text.png": &_bintree_t{text_png, map[string]*_bintree_t{}},
|
|
}}
|
|
|
|
// Restore 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, path.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
|
|
}
|
|
|
|
// Restore assets under the given directory recursively
|
|
func RestoreAssets(dir, name string) error {
|
|
children, err := AssetDir(name)
|
|
if err != nil { // File
|
|
return RestoreAsset(dir, name)
|
|
} else { // Dir
|
|
for _, child := range children {
|
|
err = RestoreAssets(dir, path.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, "/")...)...)
|
|
}
|