k3s/pkg/static/zz_generated_bindata.go

273 lines
106 KiB
Go
Raw Normal View History

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