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