k3s/pkg/static/zz_generated_bindata.go

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