1
0
mirror of https://github.com/rekby/fsextender.git synced 2025-09-19 01:14:30 +03:00
Files
fsextender/bindata.go

259 lines
16 KiB
Go

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