// Code generated by go-bindata. DO NOT EDIT. // sources: // frontend/app.js // frontend/index.html package main 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 fileInfoEx } type fileInfoEx interface { os.FileInfo MD5Checksum() string } type bindataFileInfo struct { name string size int64 mode os.FileMode modTime time.Time md5checksum string } 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) MD5Checksum() string { return fi.md5checksum } func (fi bindataFileInfo) IsDir() bool { return false } func (fi bindataFileInfo) Sys() interface{} { return nil } var _bindataFrontendAppjs = []byte( "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x56\x4b\x8f\xdb\x36\x10\xbe\xeb\x57\xcc\xc1\x00\xa9\xd4\x91\x1b\x24" + "\x27\xbb\x0e\x5a\x24\xce\xee\x02\xfb\x28\xbc\xde\xdb\xa2\x1b\x5a\x1a\x8b\xdc\xd0\xa4\x40\x52\xb1\x83\xac\xff\x7b" + "\x41\xea\x61\xc9\x76\x9c\x22\x40\x75\xa2\xc8\x99\x6f\xe6\x9b\x17\x29\xd1\xc1\x4a\x48\x7c\x98\x5f\xc3\x14\x54\x29" + "\xe5\x24\x4a\xb5\xb2\x0e\x6e\xee\x2f\x9e\x6e\xef\x16\x4f\x9f\xee\x1e\x6e\x3f\xc2\x14\xc8\x27\x21\x11\x94\x76\xb0" + "\xd2\xa5\xca\xc8\xa1\xdc\xdf\xb3\xf9\xcd\xd5\x62\x31\x0b\xb2\xb7\xda\x01\x93\x52\x6f\x30\x03\xa7\x81\xa5\x29\x5a" + "\x1b\x0c\xf5\xf4\x2e\x66\xb7\xb3\xf9\xd5\x87\xa7\xd9\x7c\xee\xb5\xee\xf5\x1a\x1d\x17\x2a\x87\x0d\x2a\x07\x1b\xa3" + "\x55\x4e\x26\x51\x34\x7a\x05\xb9\xd4\x4b\x26\x61\x30\x5e\x31\x69\x11\x5e\x8d\xa2\x28\x95\xcc\x5a\xb8\xe7\xcc\x20" + "\x7c\x8f\x00\x84\x12\x8e\xc6\x61\x09\x30\xa0\x1b\xa1\x32\xbd\x89\x93\xa5\x50\x19\x25\x9c\x59\x9e\x72\xa6\x72\x24" + "\x43\xa0\x18\xc3\xf4\x7d\x2d\x09\xe0\xb8\xb0\x89\x17\xb8\xd6\x2c\xa3\xf1\x24\x6c\xef\xe2\x49\x14\x16\x3e\x42\xac" + "\x28\x16\xc2\x49\x84\x29\x7c\xae\x0c\xfe\x09\x83\xef\x95\x85\x44\xea\x94\x39\xa1\x55\xc2\xb5\x75\xbb\xcf\x93\xda" + "\x3e\x71\x5e\x63\x98\xb0\xa2\x08\x2b\x12\x27\x0e\xb7\x8e\x36\x58\x0d\xfe\x09\xeb\x3b\x7f\x82\xeb\x25\x66\x3e\xe6" + "\x57\x6a\xa5\xa9\x0f\x9d\x0f\x11\x69\x08\x8a\x15\xd4\x9b\xd3\xee\x76\x8b\xa7\x32\x89\x33\x63\xb4\xb9\x41\x6b\x59" + "\x8e\xb4\x97\xcf\x86\x64\xe5\xc2\xbe\x00\xfc\xaa\x26\x90\xb0\x67\xb6\x0d\x26\x86\x2d\xb6\x4f\x8f\xce\xc6\x40\x2e" + "\x67\x7f\x7d\x24\xc3\x7a\xd7\x96\x21\xbd\x63\xa0\x19\x73\x6c\x08\xd6\x31\x57\xda\x21\x6c\xb9\xe9\xc5\xb9\xef\x9b" + "\xa7\x77\x42\x61\x52\x0b\xef\x1a\x74\xf4\x24\xc6\x40\xb7\xdc\x34\x92\x67\x50\xbd\x70\x4f\xf4\x00\x6f\xb7\x0f\xf0" + "\x79\x3f\x6a\x7c\x9f\x7d\xf7\xad\xf0\xb1\xdf\x72\x93\xe4\xe8\xe6\x68\x0b\xad\x2c\x5e\x22\xcb\xd0\x50\xf2\x41\x2b" + "\x87\xca\xbd\x5e\x7c\x2b\x90\x34\x49\x1d\x50\x92\xa4\x5a\x39\x26\x14\x1a\x12\x27\x5c\x64\xd8\x54\x96\x3f\xf3\x61" + "\x55\x6c\xdd\x16\x45\x9d\x81\xc4\x96\x4b\xeb\x8c\x50\x79\xbb\x23\x99\x75\x57\x2a\xc3\xed\xdd\x8a\x92\x11\x89\xe1" + "\x37\x78\x13\x37\x66\x7c\x11\x78\xef\x92\x35\x73\x29\xa7\xa3\x7f\xc4\x9a\xe5\xf8\x38\x1a\xc5\xfb\x7a\x68\xcc\x49" + "\xa1\xbe\xbc\xb6\x26\x25\x71\xc2\x9c\x33\x94\xf8\xf5\xb0\xc9\x7d\x1b\x27\x2f\x6e\xb9\xde\xbc\x0e\x50\x24\x0e\x3f" + "\xb4\x3d\x36\xe8\x4a\xa3\x7a\xd5\x73\xe4\xc4\x57\x91\xa1\xee\x3b\xe1\xc3\x68\x4d\x0a\x53\x8f\xff\x87\xd5\xa5\x49" + "\xf1\x3d\x69\x51\xad\x49\xcf\x3a\x15\xce\x8b\x02\x55\xb6\xd0\x74\x40\x49\xb0\x40\xe2\x63\xa7\xeb\x83\x5f\x70\x9a" + "\x95\x99\xd0\x8f\x23\xca\x58\xfa\xb2\x2e\xde\xbe\xac\x0b\xcc\xe3\xc1\xff\xc8\x21\x18\x3c\xc5\xa1\x3e\xf8\x05\x0e" + "\xd4\xd7\xd2\xe3\xe8\x85\x15\x85\x14\xd5\x50\x7a\x1c\x3d\xb3\xaf\xcc\xa6\x46\x14\x2e\xee\x95\xc5\xbe\xbf\x1f\xe6" + "\xd7\xc3\x4e\x3b\xf9\x5e\xf0\xc5\x3c\x06\xe2\xf1\xda\x36\xef\xb4\xff\xc5\x6c\xd1\xd9\xee\xf7\xff\x41\x73\x06\x62" + "\xa9\xce\xda\x52\x0f\x32\x93\xfe\x79\x45\x3c\x58\x3b\xe4\xed\x3f\x2e\x9f\x6d\xe2\xc7\xfb\xa5\xc8\xb9\x14\x39\x77" + "\xbe\x43\x3a\x22\xbb\xbd\x33\x3f\x1f\x17\xff\x71\x60\x74\x50\x77\xe7\xb2\xd0\xeb\x2f\x6e\x70\xd5\x36\x58\xf8\x39" + "\x2c\x84\x96\x6d\x8e\x0a\x8d\x48\x7b\x84\xbb\x73\xe9\xc8\xb1\xce\x44\x5a\x57\x33\x3d\x5c\x08\x15\xac\xdd\x08\x97" + "\xf2\x40\x3b\xe9\xcb\x03\xa4\xcc\x22\xbc\xfb\xfd\xdd\xb8\x93\xc8\x46\xbf\x77\x2b\xec\xa9\x2f\x0d\xb2\x2f\x93\xbe" + "\xfe\xdb\x73\xfa\xed\xed\xff\x03\x8c\x0c\x57\xac\x94\xee\x47\x10\x9d\x87\xc0\x49\x80\x5d\xef\xae\x3c\xba\xdb\x6a" + "\xb0\x93\x31\x3c\x94\x69\x1f\x08\x24\x09\xb5\xd2\xd4\x65\x17\xe3\xe7\x03\x3c\xa4\xb0\xd1\x3f\x4a\x60\x73\x99\x77" + "\x52\x56\x5f\xe0\x47\x6f\x06\x66\x79\x67\xea\xbf\xa9\x4d\x04\xa2\xc7\x2f\x80\xda\xc6\x2e\x8a\x06\x74\x55\xaa\xd4" + "\x43\xd4\x56\xc2\x74\x0a\x4f\x93\x29\x28\xdc\x54\xef\xa2\xca\xa9\xb0\x9d\x54\xcf\xa3\x49\xe4\x8b\xf9\xdf\x00\x00" + "\x00\xff\xff\xcc\xb0\x6a\xfb\xf6\x09\x00\x00") func bindataFrontendAppjsBytes() ([]byte, error) { return bindataRead( _bindataFrontendAppjs, "frontend/app.js", ) } func bindataFrontendAppjs() (*asset, error) { bytes, err := bindataFrontendAppjsBytes() if err != nil { return nil, err } info := bindataFileInfo{ name: "frontend/app.js", size: 2550, md5checksum: "", mode: os.FileMode(436), modTime: time.Unix(1, 0), } a := &asset{bytes: bytes, info: info} return a, nil } var _bindataFrontendIndexhtml = []byte( "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x57\x5b\x57\xdb\xba\x12\x7e\xef\xaf\xd0\xf6\x5e\xe7\x09\x64\xe5\x46" + "\x08\x6c\x3b\x6b\x11\x02\x05\xd2\x90\x72\x2d\xe5\x4d\xb1\xc6\xb6\x12\x59\x72\x24\x39\x26\xb0\xce\x7f\x3f\xcb\xce" + "\x95\x9e\x42\x43\x57\x37\x2f\x66\x66\x34\xa3\xef\x9b\x19\x49\x13\xef\x2f\xa6\x02\x3b\x4b\x01\xc5\x36\x11\xed\x4f" + "\x5e\xf1\x41\x82\xca\xc8\x77\x40\x3a\xed\x4f\x08\x79\x31\x50\x56\xfc\x83\x90\xf7\x17\xc6\xe8\x1a\x26\x19\xd7\xc0" + "\x50\x02\x96\x22\x4b\x23\x83\x30\x5e\xd8\x4b\x55\x10\x53\x6d\xc0\xfa\x4e\x66\x43\xdc\x72\x36\x4d\xb1\xb5\x29\x2e" + "\xfc\xa7\xbe\xf3\x80\xef\x8e\xf0\xb1\x4a\x52\x6a\xf9\x50\x80\x83\x02\x25\x2d\x48\xeb\x3b\xe7\x27\x3e\xb0\x08\x5e" + "\x79\x4a\x9a\x80\xef\x4c\x39\xe4\xa9\xd2\x76\x63\x71\xce\x99\x8d\x7d\x06\x53\x1e\x00\x2e\x85\x5d\xc4\x25\xb7\x9c" + "\x0a\x6c\x02\x2a\xc0\xaf\xee\x22\x13\x6b\x2e\xc7\xd8\x2a\x1c\x72\xeb\x4b\xe5\xb4\x3f\xad\x09\x75\x94\xb2\xc6\x6a" + "\x9a\xa2\xe3\x9b\x9b\x35\x17\xc1\xe5\x18\x69\x10\xbe\x63\xec\x4c\x80\x89\x01\xac\x83\x62\x0d\xa1\xef\x14\x3c\xcc" + "\x21\x21\x01\x93\x23\xe3\x06\x42\x65\x2c\x14\x54\x83\x1b\xa8\x84\xd0\x11\x7d\x22\x82\x0f\x0d\xb1\x39\xb7\x16\x34" + "\x1e\x2e\x77\x20\x0d\xb7\xe2\x56\x48\x60\x0c\x59\xe9\xdc\x84\x4b\x37\x30\xc6\x29\xb7\x9d\xff\x71\x69\x21\xd2\xdc" + "\xce\x7c\xc7\xc4\xb4\xb6\xd7\xc4\x5f\x8e\x5a\x07\xcf\x3b\xe3\x83\x70\x14\xf5\x7b\x57\x64\x3c\x69\x0c\x06\xb5\xbe" + "\x0e\x5b\xf7\xc2\x7e\x4f\x04\xb9\x3f\xb9\xd9\xb9\x8e\x2a\x61\x5c\xab\xf8\x0e\x0a\xb4\x32\x46\x69\x1e\x71\xe9\x3b" + "\x54\x2a\x39\x4b\x54\x66\x1c\x44\xfe\x1c\xb7\x12\x7f\x4e\x6d\x10\x2f\x48\x31\xaa\xc7\x62\xf6\x51\x5e\xc3\xb8\xdb" + "\x20\x5d\x76\x7c\x94\x5e\x1e\x7d\x17\x83\x74\xda\x33\xe6\x8e\xd6\xe2\x6e\xa5\x9b\xb5\x9e\x74\x34\x98\xda\xef\x8d" + "\xbc\xb6\x67\xe2\xfe\xfb\xbc\xb6\x27\x96\x19\x70\x43\x25\x2d\xcd\xc1\xa8\x64\xce\x4b\x83\x00\x6a\xc0\x90\xe9\x9e" + "\x5b\x71\xab\xf3\x12\x51\x21\xde\x27\x50\x6f\x35\xf0\x0e\xab\x7c\x6d\xd5\xe5\xc1\x98\x5e\xf5\x8f\xf3\x51\xeb\xb4" + "\x71\x7d\xd1\x69\x36\xed\xf3\x79\x3e\xe8\x25\x9a\x0d\x1b\xcd\x9d\x54\xe9\x2e\x19\x4c\xf5\xc5\x4e\x7d\xff\xdb\xe4" + "\xbc\xbf\x7f\xa7\x3a\x36\x3f\x1b\x34\x2f\x45\xf4\x26\xa9\x3f\x57\xaa\x98\x47\xb1\xe0\x51\x6c\xdd\x91\x21\x07\x6e" + "\xb5\xe6\x56\xc8\x3c\x18\xa1\x92\x69\xc5\x99\xb1\x19\xe3\x6a\xbb\x8a\xe9\x93\x7b\x39\x83\x7e\x38\xee\x3d\x27\x9d" + "\x5c\x05\x0c\x80\x4f\x3e\x0f\xb2\x6a\x9f\x58\x7b\x77\xd6\xd9\xef\x55\x12\xe8\x9d\xe7\x93\x69\xbe\x4d\xc5\x2c\xb7" + "\x02\xda\x37\x31\xd5\xe0\x91\xb9\xb0\xb0\x94\x10\xdb\x0b\x2c\xb4\x00\x88\x5e\x50\x79\xc2\x0f\x51\xab\xf2\x9f\x7f" + "\xd0\x7f\x17\xb6\xb8\x8a\x5e\x90\x85\x27\x8b\xa9\xe0\x91\x3c\x44\x01\x48\x0b\xfa\x1f\x54\x54\x19\x1b\xfe\x0c\x87" + "\x68\x7f\x2f\x7d\xda\xf0\xa8\xfd\xda\xa3\xd6\xd8\xf4\x48\x35\xa0\x40\x31\x40\x2f\x28\x50\x42\xe9\x43\xf4\x37\xb4" + "\xea\xd0\x0a\xd6\x4b\xdc\xe2\x4e\xa2\x5c\x82\x46\x2f\x28\xa1\x3a\xe2\x12\x5b\x95\x1e\xa2\x7a\x65\x33\x92\x6b\x62" + "\x95\xe3\x08\x24\x68\x1e\xec\x2e\x44\x9e\xd0\x08\x96\xc2\x94\x33\x50\x4b\x01\xb4\x56\x45\x40\xc6\x4d\x2a\xe8\xec" + "\x10\x49\x25\x61\x19\xcd\x23\xab\x24\x79\x64\x79\x4f\x7b\x43\xc5\x66\x8b\xee\x91\x74\x8a\x02\x41\x8d\xf1\x1d\x49" + "\xa7\x43\xaa\xd1\xfc\x83\xe1\x29\xa5\x92\x61\x11\x2d\x15\xc5\xf1\x45\xc3\x08\xa7\x9a\x27\x54\xcf\x9c\x65\xe2\x3d" + "\xfa\x3a\x00\x1e\x6a\x2a\xd9\xb2\x03\xff\x76\xda\x1e\x5f\x2e\x08\xa9\x41\x21\xc5\xa6\xa8\x25\xa6\xc2\x62\x33\xc9" + "\xa8\x06\xa7\xed\x11\xde\x5e\xf5\x94\x67\x52\x2a\x97\x2e\x34\x4d\xcb\x9a\x3b\xcb\x0e\x28\x8c\x6d\x8f\xd0\x05\x7e" + "\x22\xe9\x74\xd9\x0f\x8c\xaf\xb8\xac\x33\x5d\xe6\x48\x28\xca\xb8\x8c\xd6\x98\xe3\xea\xc6\x7e\xff\x87\x2f\xe5\xb2" + "\x70\x0d\x29\x4e\x33\x61\xc0\x41\x54\x73\x8a\x63\xce\x18\x48\xdf\xb1\x3a\x7b\x0d\xd9\x23\xcb\x70\x1e\x61\x7c\x0b" + "\x38\x8b\xda\x6e\x09\xa7\x3c\xb6\x98\xa9\x5c\x16\x34\x8a\xbc\xbd\xb1\x7b\x11\xa8\xd6\xf6\xe8\x2a\xf5\xab\x40\x5c" + "\x40\x71\x4d\xe0\xc2\x80\x0a\xa9\x78\x2d\x9d\x76\x26\xcb\xdc\xb2\x22\x9d\x1e\x89\x6b\x1f\x22\x51\x76\xe4\xfc\x8c" + "\xcc\x0f\xc7\x66\x47\xbc\x8b\xc0\xd9\x24\x9b\x44\xc8\xe8\xc0\x77\x56\x4b\x79\x12\xe1\x50\x64\x9c\xa1\x95\x93\xd1" + "\x1b\xb9\x5a\x97\x7e\x2b\x98\xe5\x59\x59\x7b\x6f\x2c\x84\x64\x08\x0c\x6b\x30\xa9\x92\x86\x4f\x01\xfd\xa8\xc0\xd5" + "\xe6\x70\x76\xb0\x89\xb6\x0c\x56\x8e\x16\x5a\x09\xb3\x61\x20\xa5\x65\x8d\xb1\x84\xf6\x01\x94\xf3\xdb\xeb\xe7\xc9" + "\x2c\x4d\xab\x3d\x3d\x52\x2a\x3e\x14\xbd\x88\xbb\x0e\x98\x6a\x68\x7b\xc5\x55\xd5\xf6\xc8\xe2\x53\xa8\x3e\x12\xb0" + "\xbc\x73\xb6\x6c\x5f\x78\x0a\x04\x4d\xa8\xe5\x4a\xe2\x80\xeb\x40\xbc\x75\x78\xca\xf6\x5d\x15\x67\xbe\xc3\x1b\x5d" + "\x59\x4c\x65\xa3\xab\x0c\xf4\x0c\x85\x5c\x1b\xbb\x8b\x6c\x0c\x12\x7d\x55\x69\x0a\xda\x1d\x99\x85\xbc\x1e\xdc\x2e" + "\x36\xe6\x36\x13\x68\x9e\xda\x79\xd7\x6d\xf9\x40\x8e\x26\xc5\x5e\xa4\xee\xd6\xdd\xea\x42\x28\xdf\xc2\xd1\xab\xa7" + "\xf0\x67\x8f\xe1\x69\x94\x1e\x0f\x49\xef\xe2\x4a\x7c\xb9\x0c\x07\xd9\x41\xd5\xd2\x7a\x4d\x91\xcb\xfe\xe3\x93\xb0" + "\xf9\xb5\x6a\x5d\xd9\x64\xdc\xbf\x66\x47\x59\xeb\xed\xc7\xb0\xed\x91\x39\xe8\xdf\x67\x90\x2e\x53\x43\xaa\x6e\xb5" + "\xe1\x56\x97\x8a\xed\x58\xdc\xdc\xd6\xfa\x10\xe8\x07\x7d\x41\x8f\xcc\x24\x09\xd3\xf1\xc1\xc3\xf5\xd5\xf9\xad\xe8" + "\xaa\x59\x3f\xb9\xb3\x51\xaf\x73\x22\x59\x97\x9b\x9b\xe0\x5f\x65\xf1\xd6\xbc\x3c\xfa\x71\x5c\xfe\x35\xa5\xbd\x9d" + "\x4a\xed\x39\xdb\xbb\xbb\xfb\x72\x35\x1e\xec\xe7\xd5\xcf\xe7\xba\x39\x0d\xed\x71\xd4\x0f\x4f\xd9\x63\x70\x74\x06" + "\x5d\x7b\x2a\x7b\x8f\xa6\x63\xb6\xa2\xf4\xdb\x9c\x7e\x36\x7c\xad\x75\xdb\x91\x21\x9d\x90\x9f\x8f\xcf\xc4\x99\xba" + "\xe7\xf1\x23\x0b\x9a\xb7\xa7\xd9\x68\xbf\x9f\x5c\x54\x6e\xbf\x05\xdf\x4c\xff\x61\x0c\xdd\xd3\x3c\xe6\x95\xe7\x77" + "\x46\xae\x77\xc9\xd0\x34\x2d\x70\xbc\xaa\xa1\x47\xe6\x83\x84\x47\xe6\xbf\x0d\xff\x17\x00\x00\xff\xff\x03\x43\x00" + "\x2b\x2c\x0e\x00\x00") func bindataFrontendIndexhtmlBytes() ([]byte, error) { return bindataRead( _bindataFrontendIndexhtml, "frontend/index.html", ) } func bindataFrontendIndexhtml() (*asset, error) { bytes, err := bindataFrontendIndexhtmlBytes() if err != nil { return nil, err } info := bindataFileInfo{ name: "frontend/index.html", size: 3628, md5checksum: "", mode: os.FileMode(436), modTime: time.Unix(1, 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, &os.PathError{Op: "open", Path: name, Err: os.ErrNotExist} } // // MustAsset is like Asset but panics when Asset would return an error. // It simplifies safe initialization of global variables. // nolint: deadcode // 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, &os.PathError{Op: "open", Path: name, Err: os.ErrNotExist} } // // AssetNames returns the names of the assets. // nolint: deadcode // 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){ "frontend/app.js": bindataFrontendAppjs, "frontend/index.html": bindataFrontendIndexhtml, } // // 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, &os.PathError{ Op: "open", Path: name, Err: os.ErrNotExist, } } } } if node.Func != nil { return nil, &os.PathError{ Op: "open", Path: name, Err: os.ErrNotExist, } } 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{Func: nil, Children: map[string]*bintree{ "frontend": {Func: nil, Children: map[string]*bintree{ "app.js": {Func: bindataFrontendAppjs, Children: map[string]*bintree{}}, "index.html": {Func: bindataFrontendIndexhtml, Children: 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 } return os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime()) } // 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, "/")...)...) }