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