iris/_examples/file-server/http2push-embedded/bindata.go

459 lines
30 KiB
Go
Raw Normal View History

// Code generated by go-bindata. DO NOT EDIT.
// sources:
// ../http2push/assets/app2/app2app3/dirs/dir1/text.txt
// ../http2push/assets/app2/app2app3/dirs/dir2/text.txt
// ../http2push/assets/app2/app2app3/dirs/text.txt
// ../http2push/assets/app2/app2app3/index.html
// ../http2push/assets/app2/index.html
// ../http2push/assets/app2/mydir/text.txt
// ../http2push/assets/css/main.css
// ../http2push/assets/favicon.ico
// ../http2push/assets/index.html
// ../http2push/assets/js/main.js
package main
import (
"bytes"
"compress/gzip"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"strings"
"time"
)
func bindataRead(data, name string) ([]byte, error) {
gz, err := gzip.NewReader(strings.NewReader(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 _assetsApp2App2app3DirsDir1TextTxt = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x4a\x2c\x28\x30\xd2\x07\x11\x89\x05\x05\xc6\xfa\x29\x99\x45\xc5\x20\xc2\x50\xbf\x24\xb5\xa2\x44\xaf\xa4\xa2\x04\x10\x00\x00\xff\xff\x87\xaf\x9d\x00\x20\x00\x00\x00"
func assetsApp2App2app3DirsDir1TextTxtBytes() ([]byte, error) {
return bindataRead(
_assetsApp2App2app3DirsDir1TextTxt,
"assets/app2/app2app3/dirs/dir1/text.txt",
)
}
func assetsApp2App2app3DirsDir1TextTxt() (*asset, error) {
bytes, err := assetsApp2App2app3DirsDir1TextTxtBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "assets/app2/app2app3/dirs/dir1/text.txt", size: 32, mode: os.FileMode(438), modTime: time.Unix(1594843207, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _assetsApp2App2app3DirsDir2TextTxt = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x4a\x2c\x28\x30\xd2\x07\x11\x89\x05\x05\xc6\xfa\x29\x99\x45\xc5\x20\xc2\x48\xbf\x24\xb5\xa2\x44\xaf\xa4\xa2\x04\x10\x00\x00\xff\xff\x84\x14\xaa\xeb\x20\x00\x00\x00"
func assetsApp2App2app3DirsDir2TextTxtBytes() ([]byte, error) {
return bindataRead(
_assetsApp2App2app3DirsDir2TextTxt,
"assets/app2/app2app3/dirs/dir2/text.txt",
)
}
func assetsApp2App2app3DirsDir2TextTxt() (*asset, error) {
bytes, err := assetsApp2App2app3DirsDir2TextTxtBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "assets/app2/app2app3/dirs/dir2/text.txt", size: 32, mode: os.FileMode(438), modTime: time.Unix(1594843207, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _assetsApp2App2app3DirsTextTxt = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x4a\x2c\x28\x30\xd2\x07\x11\x89\x05\x05\xc6\xfa\x29\x99\x45\xc5\xfa\x25\xa9\x15\x25\x7a\x25\x15\x25\x80\x00\x00\x00\xff\xff\x64\xfe\x96\xd6\x1b\x00\x00\x00"
func assetsApp2App2app3DirsTextTxtBytes() ([]byte, error) {
return bindataRead(
_assetsApp2App2app3DirsTextTxt,
"assets/app2/app2app3/dirs/text.txt",
)
}
func assetsApp2App2app3DirsTextTxt() (*asset, error) {
bytes, err := assetsApp2App2app3DirsTextTxtBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "assets/app2/app2app3/dirs/text.txt", size: 27, mode: os.FileMode(438), modTime: time.Unix(1594843207, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _assetsApp2App2app3IndexHtml = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb2\xc9\x30\xb4\xf3\x48\xcd\xc9\xc9\x57\x70\x2c\x28\x30\x72\x2c\x28\x30\x56\xc8\xcc\x4b\x49\xad\xb0\xd1\xcf\x30\xb4\x03\x04\x00\x00\xff\xff\x74\xbe\xbd\x8c\x1d\x00\x00\x00"
func assetsApp2App2app3IndexHtmlBytes() ([]byte, error) {
return bindataRead(
_assetsApp2App2app3IndexHtml,
"assets/app2/app2app3/index.html",
)
}
func assetsApp2App2app3IndexHtml() (*asset, error) {
bytes, err := assetsApp2App2app3IndexHtmlBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "assets/app2/app2app3/index.html", size: 29, mode: os.FileMode(438), modTime: time.Unix(1565946440, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _assetsApp2IndexHtml = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb2\xc9\x30\xb4\xf3\x48\xcd\xc9\xc9\x57\x70\x2c\x28\x30\x52\xc8\xcc\x4b\x49\xad\xb0\xd1\xcf\x30\xb4\x03\x04\x00\x00\xff\xff\x75\x17\xab\xfa\x19\x00\x00\x00"
func assetsApp2IndexHtmlBytes() ([]byte, error) {
return bindataRead(
_assetsApp2IndexHtml,
"assets/app2/index.html",
)
}
func assetsApp2IndexHtml() (*asset, error) {
bytes, err := assetsApp2IndexHtmlBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "assets/app2/index.html", size: 25, mode: os.FileMode(438), modTime: time.Unix(1565946440, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _assetsApp2MydirTextTxt = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xca\x2a\x2d\x2e\x51\x48\x54\x28\x49\xad\x28\xd1\x03\x04\x00\x00\xff\xff\x2f\xf9\x22\x98\x0c\x00\x00\x00"
func assetsApp2MydirTextTxtBytes() ([]byte, error) {
return bindataRead(
_assetsApp2MydirTextTxt,
"assets/app2/mydir/text.txt",
)
}
func assetsApp2MydirTextTxt() (*asset, error) {
bytes, err := assetsApp2MydirTextTxtBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "assets/app2/mydir/text.txt", size: 12, mode: os.FileMode(438), modTime: time.Unix(1594787248, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _assetsCssMainCss = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x4a\xca\x4f\xa9\x54\xa8\xe6\xe5\x52\x50\x50\x50\x48\x4a\x4c\xce\x4e\x2f\xca\x2f\xcd\x4b\xd1\x4d\xce\xcf\xc9\x2f\xb2\x52\x48\xca\x49\x4c\xce\xb6\xe6\xe5\xaa\xe5\xe5\x02\x04\x00\x00\xff\xff\x03\x25\x9c\x89\x29\x00\x00\x00"
func assetsCssMainCssBytes() ([]byte, error) {
return bindataRead(
_assetsCssMainCss,
"assets/css/main.css",
)
}
func assetsCssMainCss() (*asset, error) {
bytes, err := assetsCssMainCssBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "assets/css/main.css", size: 41, mode: os.FileMode(438), modTime: time.Unix(1565946440, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _assetsFaviconIco = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5a\x0b\x70\x55\xc7\x79\xde\x7b\xce\x45\x12\xb2\x90\xc4\xc3\xe6\x61\x3b\x90\xf8\x31\xc4\x19\x6c\x32\xe3\xc4\x34\xe3\xc6\x34\x6d\xed\xd4\x69\x62\x32\x49\x9a\xa6\x75\xea\x36\x33\xee\xd8\x9e\xb4\x75\xdc\x7a\xa6\xc5\x31\x02\xa6\xd3\x84\x47\x28\x6f\x3b\xc6\x3c\xcc\xeb\x9e\xbd\x08\x21\x04\x92\x28\x12\x0e\x08\x5b\x3c\xec\x02\x92\x78\x08\x21\x09\x41\x25\x24\x10\xe8\x71\xb5\xe7\xdc\xd7\xb9\xf7\xef\xfc\xff\x9e\x73\x74\x25\xdd\x97\x24\x82\x33\x1e\xce\xcc\x3f\x7b\xee\x9e\xdd\xff\xff\xf6\xdf\x7f\xff\xfd\xf7\xdf\xcb\x98\x8b\xa9\x2c\x3f\x1f\xcb\x19\xec\x15\x37\x63\x5f\x67\x8c\xcd\x98\x21\x7f\x6b\xf9\x8c\x6d\x72\x33\x36\x7b\xb6\xf5\xfb\x11\xc6\x9e\xbd\x97\xb1\x99\x8c\xb1\x7c\x6c\xc7\x64\x3d\x3d\x6e\x76\xdb\x1f\xe1\x75\xab\x42\x53\x7e\x22\x3c\x6c\x91\xf0\xb0\x02\x22\xae\x14\x08\x8f\xab\x40\xec\x64\x92\xf0\x5d\x53\xfe\x59\xec\x64\x5f\x15\x1e\xa6\x08\x4f\x7f\x7f\xdf\x7a\x96\xa1\x97\x3c\xb8\x3f\x78\xfa\x0d\x08\x9e\x5d\x08\xc1\xda\x5f\x82\x51\xf6\x65\x30\xca\x67\x41\xf0\xcc\xbf\x11\x19\x07\x1e\x07\xbd\x78\x2a\x18\x65\x8f\xb5\x0b\x4d\x7d\xad\x6f\x07\x73\x0b\xcd\x45\xfd\xbb\x17\xb3\x0c\xa3\x62\xce\xfe\xa8\xd1\x0a\xf8\x98\x6d\x25\x10\x38\xfe\x53\x88\xdc\x3a\x01\x66\x6b\x11\x11\xbe\x07\x8e\xfd\x2d\x84\x2e\x2c\x05\xff\xd1\x79\x3d\xc2\xc3\x7e\x20\x78\x06\x13\x5c\x89\xe9\xdf\x06\xd1\x50\x2f\x04\x4e\xfc\x0c\xcc\x6b\xa5\x60\x1c\xfd\x21\x74\x6c\x1e\x47\x84\xef\x58\x17\xf8\xe4\x65\x30\x6f\x54\x81\x71\xe0\x89\xea\xbe\x2d\x6c\xd2\x80\xfe\xfe\x76\x30\x6f\x1c\x81\x60\xed\x7c\x08\x9e\x5d\x0c\x2d\xeb\xc7\x41\xed\xd2\x29\x50\xbb\x74\x32\xbd\x63\x1d\x7e\xc3\x36\xa1\x73\xff\x19\x14\x1e\x36\x4f\x78\xc7\xc4\xf4\xef\x80\x70\xd3\xfb\x10\x6e\x5c\x0f\xdd\x65\x73\xe1\xdc\xf2\x89\xd0\xb1\x25\x0f\x6e\x7c\x90\x07\xe7\x7f\x33\x81\xea\xf0\x5b\xb8\x79\x13\x61\xd0\x8b\xa7\x2c\x09\x7c\xfc\x57\xac\x7b\x11\xf6\x7f\x6a\x5f\xd4\xb8\x06\xa1\xfa\x15\x10\x6e\x7a\x0f\x3a\xb4\xc7\xa0\x61\x55\x3e\x04\x8f\xfc\x39\x84\x3e\xfa\x4b\x68\x5c\x93\x4f\x75\xf8\x2d\x74\x71\x05\x44\x45\x13\xea\x54\xeb\x7c\x85\xa9\x48\xf8\x1e\x15\xcd\xf4\xcd\xee\x7f\x71\x65\x3e\x04\x3e\x7c\x86\x78\x5c\x5a\x1d\xd3\xbf\x7e\x05\xa0\x2c\x94\x89\xb2\x03\xd5\x3f\x66\x88\x05\x31\x21\x36\x1b\xff\xd9\xe5\x13\xe1\xda\xc6\x5c\x68\xdf\x94\x4b\x63\x71\xf0\x37\xbd\x0f\x38\x56\x1c\x33\x8e\x1d\x75\x80\xba\x40\x9d\x0c\xd6\x5f\xcd\x92\x29\x44\x83\xf5\x87\xba\x76\xfa\x73\x85\xe1\x5c\x18\x07\x9e\x38\x86\x18\x68\x8e\xac\xf9\xbb\xbe\x39\x87\xc8\x99\xbf\x13\x3f\xa3\x39\xc6\xb9\x8e\xed\x4f\xb6\xe0\x61\x3f\x40\xdb\x40\x1b\x41\x5b\x19\x62\x3f\xc7\x7f\x4a\xb6\x85\x0f\xda\x9a\xdd\x9f\xd6\x80\xe6\x62\xd2\x26\xd5\xd7\xd0\x46\xc9\x56\x0f\x3c\xde\x6f\xbf\xe5\xb3\xc8\xa6\xd1\xb6\xc9\xc6\x4f\xbf\x01\x68\xf3\x68\xfb\xce\x3a\xf2\x30\x26\x76\x32\x85\xd6\x08\xae\x95\xc1\xeb\x87\xd6\x14\xb3\x69\x11\xad\x39\xaf\x5b\x1d\xed\xfa\x05\x60\x8c\x65\x32\xc6\x54\x8b\x5c\x31\x64\x3d\x0b\x63\xe8\xb0\x45\x2d\x56\xdf\x99\x96\x8f\x99\x1b\xeb\x67\xf2\x47\x8b\xea\xf3\xf9\x08\xae\x22\xe5\x09\xae\x4e\x17\x5c\xfd\xc2\x28\x69\x8a\xe0\xca\x58\xb4\x3d\xdb\x17\xa6\x29\xff\x5f\x04\x57\x5b\x85\xe6\xba\x92\x90\xb8\x1a\x43\x4a\x4c\xbd\x62\xd7\xb7\x08\xae\xd6\x0b\xae\xfe\x8f\xe0\xea\x9b\x38\x1e\x1f\x1f\x4b\xfe\x34\xb5\x7c\xa5\x40\xec\xca\x02\xbd\x64\x3a\xe8\xfb\xbe\x38\x94\x4a\xa6\x83\xf0\x66\x82\xd0\x14\x10\x9a\x0b\x44\xe1\x38\x5c\x2b\x44\xf8\x4e\x75\x5c\x01\xe1\x75\x03\xf2\x11\x9a\x2b\x2a\xb8\x52\x2b\xb8\x3a\x4f\x68\x8a\x92\x0c\x03\xc9\xf7\xb0\x02\xa3\xfc\x2b\x10\xe9\xae\x85\xa8\x7e\x15\xa2\xfa\x95\x18\xba\x0a\xa1\xb3\x8b\x49\xbe\xbe\xe7\x5e\x08\xfe\xef\x3f\x81\xd9\x51\x09\x91\xbe\x4b\x44\xf8\x8e\x75\xf8\x4d\x70\x37\x04\x3e\xfe\x11\xf9\x14\xbd\x68\x3c\xe2\xe8\x14\x5c\x7d\x49\x78\x99\x2b\x11\x06\x47\xfe\x81\xd9\x10\x0d\xde\x82\xc1\x8f\x79\xe3\x30\xe8\x7b\xa7\x81\x51\xfa\x28\x98\xd7\xca\x00\xa2\xa6\xfc\x80\x65\xcc\x3b\x7e\xc3\x36\xfa\xde\x07\x08\x93\xd9\x5a\x0c\xfa\xfe\x87\x41\x68\xac\x43\x70\xf5\x59\x92\xe3\x1d\xea\x1a\x92\xc9\x8f\x06\x3a\xc1\xff\xe1\x5c\xda\x67\x91\x27\x3e\x91\xde\x0b\xe4\xaf\xfc\x47\x5f\x20\xc2\x77\xac\x23\xac\x1d\x95\xd4\xd6\xff\xe1\x9f\x10\x2f\xfa\x5d\xf2\x05\xc4\x70\x4c\x70\xf5\x7e\x94\x
func assetsFaviconIcoBytes() ([]byte, error) {
return bindataRead(
_assetsFaviconIco,
"assets/favicon.ico",
)
}
func assetsFaviconIco() (*asset, error) {
bytes, err := assetsFaviconIcoBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "assets/favicon.ico", size: 15086, mode: os.FileMode(438), modTime: time.Unix(1565946440, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _assetsIndexHtml = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x64\x91\xbf\x4e\xc3\x30\x10\x87\xf7\x48\x79\x87\xeb\x4d\x20\x91\x1a\x36\x86\x38\x4b\xa1\x2b\x48\x94\x81\xd1\x75\xae\xcd\xb5\x8e\x13\xd9\x97\xb4\x7d\x7b\x94\x3f\x2d\x20\x26\xfb\x7e\xbe\xfb\xfc\xc9\xce\x17\x2f\x6f\xab\xcd\xd7\xfb\x2b\x54\x52\xbb\x22\x4d\xf2\x61\x05\x67\xfc\x5e\x23\x79\x2c\xd2\x64\xc8\xc8\x94\x45\x9a\x00\x00\xe4\x35\x89\x01\x5b\x99\x10\x49\x34\x7e\x6e\xd6\xd9\x33\xfe\x39\xf3\xa6\x26\x8d\x3d\xd3\xa9\x6d\x82\x20\xd8\xc6\x0b\x79\xd1\x78\xe2\x52\x2a\x5d\x52\xcf\x96\xb2\xb1\x78\x00\xf6\x2c\x6c\x5c\x16\xad\x71\xa4\x9f\x96\x8f\x37\x96\x63\x7f\x84\x40\x4e\x23\xdb\xc6\x23\x54\x81\x76\x1a\xd5\xce\xf4\x43\xbd\x64\xdb\x20\xc8\xa5\x25\x8d\x5c\x9b\x3d\xa9\x73\x36\xf5\xa9\xff\x80\x28\x17\x47\xb1\x22\x92\x1b\xa6\xed\xb6\x8e\xad\xb2\x31\xaa\xda\xb0\x5f\xda\x18\x7f\x8d\x0a\x8b\xa3\x62\xcd\x8e\xe0\x83\x42\x4f\x21\x57\x53\x94\x26\xb9\x9a\x1f\x23\x4d\xf2\x6d\x53\x5e\xae\x23\xec\xdb\x4e\x66\xa1\x6d\x27\x32\xa8\x34\xde\x3a\xb6\x47\x8d\x8d\x5f\x0d\x9b\xbb\x7b\x84\xde\xb8\x8e\x34\x8e\x35\xd4\xb4\x98\x6e\x9d\x21\xd1\x06\x6e\xaf\x14\xa1\xb3\xa8\x83\xe9\xcd\x94\x22\xc4\x60\x7f\xcc\x0f\xb3\xf8\x21\x62\x91\xab\xa9\x65\xd4\x9b\xa5\x46\xd3\xe1\x4b\xbf\x03\x00\x00\xff\xff\x4d\xfe\x17\x45\xe2\x01\x00\x00"
func assetsIndexHtmlBytes() ([]byte, error) {
return bindataRead(
_assetsIndexHtml,
"assets/index.html",
)
}
func assetsIndexHtml() (*asset, error) {
bytes, err := assetsIndexHtmlBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "assets/index.html", size: 482, mode: os.FileMode(438), modTime: time.Unix(1594872636, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _assetsJsMainJs = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x4a\xce\xcf\x2b\xce\xcf\x49\xd5\xcb\xc9\x4f\xd7\x50\x4a\xad\x48\xcc\x2d\xc8\x49\x55\xd2\xb4\xe6\xe5\xe2\xe5\x4a\x2b\xcd\x4b\x2e\xc9\xcc\xcf\x53\xc8\xcf\x73\xce\xc9\x4c\xce\xd6\xd0\x54\xa8\xe6\xe5\x52\x50\x50\x50\x28\xcf\xcc\x4b\xc9\x2f\xd7\x4b\xcc\x49\x2d\x2a\xd1\x50\x4a\x2a\x2d\x29\xc9\xcf\x53\x48\x06\xa9\x49\x4d\x01\x6b\xae\x05\x04\x00\x00\xff\xff\xa4\xb7\x99\x52\x57\x00\x00\x00"
func assetsJsMainJsBytes() ([]byte, error) {
return bindataRead(
_assetsJsMainJs,
"assets/js/main.js",
)
}
func assetsJsMainJs() (*asset, error) {
bytes, err := assetsJsMainJsBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "assets/js/main.js", size: 87, mode: os.FileMode(438), modTime: time.Unix(1594787764, 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){
"assets/app2/app2app3/dirs/dir1/text.txt": assetsApp2App2app3DirsDir1TextTxt,
"assets/app2/app2app3/dirs/dir2/text.txt": assetsApp2App2app3DirsDir2TextTxt,
"assets/app2/app2app3/dirs/text.txt": assetsApp2App2app3DirsTextTxt,
"assets/app2/app2app3/index.html": assetsApp2App2app3IndexHtml,
"assets/app2/index.html": assetsApp2IndexHtml,
"assets/app2/mydir/text.txt": assetsApp2MydirTextTxt,
"assets/css/main.css": assetsCssMainCss,
"assets/favicon.ico": assetsFaviconIco,
"assets/index.html": assetsIndexHtml,
"assets/js/main.js": assetsJsMainJs,
}
// 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{
"assets": {nil, map[string]*bintree{
"app2": {nil, map[string]*bintree{
"app2app3": {nil, map[string]*bintree{
"dirs": {nil, map[string]*bintree{
"dir1": {nil, map[string]*bintree{
"text.txt": {assetsApp2App2app3DirsDir1TextTxt, map[string]*bintree{}},
}},
"dir2": {nil, map[string]*bintree{
"text.txt": {assetsApp2App2app3DirsDir2TextTxt, map[string]*bintree{}},
}},
"text.txt": {assetsApp2App2app3DirsTextTxt, map[string]*bintree{}},
}},
"index.html": {assetsApp2App2app3IndexHtml, map[string]*bintree{}},
}},
"index.html": {assetsApp2IndexHtml, map[string]*bintree{}},
"mydir": {nil, map[string]*bintree{
"text.txt": {assetsApp2MydirTextTxt, map[string]*bintree{}},
}},
}},
"css": {nil, map[string]*bintree{
"main.css": {assetsCssMainCss, map[string]*bintree{}},
}},
"favicon.ico": {assetsFaviconIco, map[string]*bintree{}},
"index.html": {assetsIndexHtml, map[string]*bintree{}},
"js": {nil, map[string]*bintree{
"main.js": {assetsJsMainJs, 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, "/")...)...)
}