bindata.go 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. // Code generated by go-bindata.
  2. // sources:
  3. // pub/close.svg
  4. // pub/index.css
  5. // pub/index.html
  6. // pub/index.js
  7. // DO NOT EDIT!
  8. package web
  9. import (
  10. "bytes"
  11. "compress/gzip"
  12. "fmt"
  13. "io"
  14. "strings"
  15. "os"
  16. "time"
  17. "io/ioutil"
  18. "path"
  19. "path/filepath"
  20. )
  21. func bindataRead(data, name string) ([]byte, error) {
  22. gz, err := gzip.NewReader(strings.NewReader(data))
  23. if err != nil {
  24. return nil, fmt.Errorf("Read %q: %v", name, err)
  25. }
  26. var buf bytes.Buffer
  27. _, err = io.Copy(&buf, gz)
  28. clErr := gz.Close()
  29. if err != nil {
  30. return nil, fmt.Errorf("Read %q: %v", name, err)
  31. }
  32. if clErr != nil {
  33. return nil, err
  34. }
  35. return buf.Bytes(), nil
  36. }
  37. type asset struct {
  38. bytes []byte
  39. info os.FileInfo
  40. }
  41. type bindataFileInfo struct {
  42. name string
  43. size int64
  44. mode os.FileMode
  45. modTime time.Time
  46. }
  47. func (fi bindataFileInfo) Name() string {
  48. return fi.name
  49. }
  50. func (fi bindataFileInfo) Size() int64 {
  51. return fi.size
  52. }
  53. func (fi bindataFileInfo) Mode() os.FileMode {
  54. return fi.mode
  55. }
  56. func (fi bindataFileInfo) ModTime() time.Time {
  57. return fi.modTime
  58. }
  59. func (fi bindataFileInfo) IsDir() bool {
  60. return false
  61. }
  62. func (fi bindataFileInfo) Sys() interface{} {
  63. return nil
  64. }
  65. var _closeSvg = "\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x2c\x8e\xd1\xca\x84\x20\x14\x84\x5f\xe5\x70\xee\xff\xa3\x1e\xc9\xfc\x97\xec\x62\xaf\xdb\x87\x58\x28\x32\x68\xb7\xd8\x24\x63\x9f\x7e\xd5\x02\x19\xc6\x6f\x66\xc4\x66\xdb\x47\x38\x5e\xf3\x7b\x73\xe8\x43\x58\x6f\x42\xc4\x18\x29\x6a\x5a\x3e\xa3\x60\x29\xa5\x48\x0d\x84\x38\xf5\xc1\x3b\xd4\x06\xc1\x0f\xd3\xe8\xc3\xe9\xf7\x69\x88\xf7\xe5\x70\x28\x41\x82\x36\xe9\x60\xdb\xac\xcf\xe0\xa1\x77\xf8\x60\x4b\x15\xfc\x93\xe1\x8e\x0d\x69\x0b\x75\xba\x2a\x0b\xaa\x22\x6b\x0b\x2f\xa4\xbe\x4a\x17\x57\x67\xaf\x2c\x66\x26\xc5\x90\xa5\x4b\x98\x65\x32\xb3\xcd\x2f\x15\xc9\xfc\xaf\x84\x25\x49\xcb\x2f\x8a\xb6\xc9\x1f\x6e\x7f\x01\x00\x00\xff\xff\xe5\x79\xbd\x91\xd8\x00\x00\x00"
  66. func closeSvgBytes() ([]byte, error) {
  67. return bindataRead(
  68. _closeSvg,
  69. "close.svg",
  70. )
  71. }
  72. func closeSvg() (*asset, error) {
  73. bytes, err := closeSvgBytes()
  74. if err != nil {
  75. return nil, err
  76. }
  77. info := bindataFileInfo{name: "close.svg", size: 216, mode: os.FileMode(420), modTime: time.Unix(1435948337, 0)}
  78. a := &asset{bytes: bytes, info: info}
  79. return a, nil
  80. }
  81. var _indexCss = "\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x94\x54\x4d\x4f\xe3\x30\x10\xbd\xf7\x57\x58\x70\x00\x24\x52\x4c\x59\xaa\xad\x91\xf6\x47\xec\x6d\x8f\x8e\xed\x24\x16\x8e\x27\xb2\x1d\xda\xb2\xda\xff\xbe\xe3\x8f\x24\xa5\x6c\x25\x56\x90\x2a\x99\x79\xe3\xcc\xbc\xf7\x26\x35\xc8\x23\xf9\xbd\x22\xa4\xe6\xe2\xb5\x75\x30\x5a\xc9\xc8\x75\xd3\x34\x2f\x18\x6b\xc0\x86\xaa\xe1\xbd\x36\x47\x46\x6e\x7e\x72\xa3\xf6\xfc\x78\x73\x4f\x3c\xb7\xbe\xf2\xca\xe9\x05\xe5\xf5\xbb\x62\xe4\xdb\x66\x38\xcc\xa1\xbd\xd2\x6d\x17\x18\x79\xa2\xf4\x65\xf5\x67\xb5\x6a\xc0\xf5\xe9\x55\x41\x1d\x42\xc5\x8d\x6e\x2d\x23\x42\xd9\xa0\x5c\xca\x5f\xd7\xdc\xa5\xfc\x5e\xcb\xd0\x31\xb2\x7d\x2e\xa7\xf5\xdc\xb5\x1a\xb1\x94\xf0\x31\x40\x8c\x0c\xe0\x75\xd0\x80\x31\xa7\x0c\x0f\xfa\x4d\xe5\x13\x46\x67\xd2\x09\xff\xdd\xf8\xd3\xc5\xc6\x97\x76\x28\xcd\x98\x81\x4b\xa9\x6d\xcb\xc8\xe6\x39\x07\x04\x18\x70\xc8\xda\x6e\xb7\x8b\x8f\x35\x38\xa9\x5c\xe5\xb8\xd4\xa3\x47\x4e\x32\x28\x47\x19\x79\x1c\x0e\xc4\x83\xd1\x92\x5c\x0b\x21\x62\x06\xc6\x60\xb4\xc5\x26\x2c\x58\x95\xa1\x87\xca\x77\x5c\xc2\x3e\xce\x8c\x9d\x91\x2d\x5e\xae\xad\xf9\x2d\xbd\x27\xe5\x7f\xbd\xb9\x9b\x67\x66\x0d\x88\xd1\x67\x19\x3f\xbf\x86\xee\x9a\x05\xc9\x70\xba\xfa\x55\x87\x4a\xdb\x61\x0c\xd5\x60\xb8\x50\x1d\x18\xac\x49\xe5\xf3\x2c\x52\xca\xd3\xa2\x1e\xde\xbf\x80\x15\xfd\x90\x32\x9f\x18\x2a\x14\x3e\x6f\xe9\x25\x45\x4f\x3d\x61\x54\x13\xce\xf4\xd9\x3c\xe6\xc2\xe0\x50\xc1\x22\x7d\xba\x4f\xa6\xda\x50\xda\x7b\xa2\xb8\x57\x38\x56\x85\x7c\xce\xd0\x98\x66\xc4\x0b\x74\xc0\xaf\x5b\x7a\xf7\x21\x5e\x81\xd3\xa9\x8b\x00\xc3\xec\xc3\x59\xbe\x1a\x42\x80\xbe\x8a\xbd\xfc\x5b\xca\x09\xe1\xa2\x59\xbe\xaa\x76\x61\x69\x8d\x82\xbf\x9e\xad\x5d\x35\xd1\xd9\x6c\xe3\xdf\x82\x6d\x46\x71\x19\xab\xd4\x27\x07\x4e\x4a\xfc\x20\x3c\x95\x4d\xc9\xe4\x83\xc2\xb4\x54\x02\x1c\xcf\x3c\x66\xdb\x2d\x55\xeb\xce\x86\xbc\x45\x06\x38\xae\x41\x1a\xf0\xf4\x2d\x49\xef\x72\xd0\xe4\xd3\x38\x68\xbc\x68\xf9\x78\xa4\xe3\x4c\xf6\xe4\xb2\xad\xbc\x46\x32\xc6\x90\x7a\x46\xd6\xd1\x00\xf1\xce\xe5\x75\xa3\x99\xb8\x48\x6a\x79\x98\x36\x6f\x22\x75\x99\x5f\xf7\xbc\x45\x5b\xa0\x39\x6f\xaf\x1e\xfc\x83\x30\xe0\xd5\xda\xbf\xb5\x57\x77\x67\xc0\xe5\xdd\x59\xe1\x53\xa1\x17\x94\x53\x83\x8a\xa3\x5a\x28\xb7\x67\xf9\xf2\x75\xfb\x8e\x03\xc6\x9f\x44\xc6\xe8\x7c\x64\x63\x00\x3d\x1d\x08\x03\x17\x3a\xe0\x17\x87\xae\x9f\xe2\xb3\xd4\x1e\x77\xe6\xf8\x81\x61\xe3\x59\x07\x6f\x65\x83\x4e\x0a\x92\xde\x7f\x03\x00\x00\xff\xff\x9f\x3b\x3f\xc1\x8d\x05\x00\x00"
  82. func indexCssBytes() ([]byte, error) {
  83. return bindataRead(
  84. _indexCss,
  85. "index.css",
  86. )
  87. }
  88. func indexCss() (*asset, error) {
  89. bytes, err := indexCssBytes()
  90. if err != nil {
  91. return nil, err
  92. }
  93. info := bindataFileInfo{name: "index.css", size: 1421, mode: os.FileMode(420), modTime: time.Unix(1436043545, 0)}
  94. a := &asset{bytes: bytes, info: info}
  95. return a, nil
  96. }
  97. var _indexHtml = "\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x9c\x52\x4d\x73\xd3\x30\x10\xbd\xf7\x57\x2c\x3a\x13\x6d\x42\x38\x90\x62\x87\x19\x92\x0c\x30\x53\xa0\x53\xc2\x00\x47\xc5\x5e\xc7\x0a\xb2\xe5\x4a\xeb\x26\xfe\xf7\x48\xb6\xdb\x86\xd2\x13\x3a\xed\xd7\x7b\x6f\x3f\x94\xbc\x58\x7f\x5d\x6d\x7f\x5d\x6f\xa0\xe4\xca\xc0\xf5\xf7\xf7\x57\x9f\x56\x20\x26\x88\x3f\xe6\x2b\xc4\xf5\x76\x0d\x3f\x3f\x6e\x3f\x5f\xc1\x4c\x4e\xe1\x1b\x3b\x9d\x31\xe2\xe6\x8b\x00\x51\x32\x37\x97\x88\xc7\xe3\x51\x1e\xe7\xd2\xba\x3d\x6e\x6f\xf0\x14\x59\x66\x11\x36\x9a\x13\xdf\x63\x64\xce\xb9\x58\x5e\x24\xbd\xc8\xa9\x32\xb5\x4f\x9f\x21\x98\x2d\x16\x8b\x01\x17\x6a\x01\x92\x92\x54\x1e\x8d\x60\xb2\x66\x43\xcb\x0f\x36\xc1\xc1\x1a\xa2\x15\xb1\x82\xc8\x33\xa1\xdb\x56\xdf\xa5\x62\x65\x6b\xa6\x9a\x27\xdb\xae\x21\x01\xd9\xe0\xa5\x82\xe9\xc4\x18\x79\xdf\x42\x56\x2a\xe7\x89\xd3\x96\x8b\xc9\x1b\x81\x23\x91\xd1\xf5\x6f\x28\x1d\x15\xa9\x40\x8f\xba\xce\xe9\x24\x33\xef\x45\x9f\x8d\xcf\x91\x49\x85\xe7\xce\x90\x2f\x89\xf8\x31\xc1\x41\x69\x14\x88\x80\x7f\xf9\xc6\x31\x8b\xd0\x8b\x97\x7b\x6b\xf7\x86\x54\xa3\xbd\xcc\x6c\x15\x11\xef\x0a\x55\x69\xd3\xa5\x37\xca\xd0\x51\x75\x97\xaf\xa7\xd3\x97\xf3\xe9\xf4\xff\x94\x13\xbc\x5f\x59\xb2\xb3\x79\x37\x36\x53\x58\x57\x81\x6a\xd9\x06\xc9\xc6\x10\x07\x94\x2d\x8a\xb1\xd5\x90\xcf\xf5\x1d\xe8\x3c\x15\x3b\xe5\x1e\x82\x67\xe1\xcc\x04\xf2\x04\x83\x7b\x96\xd4\x75\xd3\xf2\x59\x0b\xa2\x2f\x6d\x9d\x11\xd0\x18\x95\x51\x69\x4d\x4e\x2e\x15\x9b\x70\x01\x07\x5c\x12\x84\x1c\xb0\x05\x5f\x5a\x17\x8e\x12\x19\x7b\x8e\x87\x2e\xce\x05\x1e\xb5\xab\xe6\x2f\xed\x04\xe3\x30\xcb\x8b\xc1\xf1\x99\xd3\x0d\x83\x77\x59\x38\x1b\xaa\x83\x3a\x3d\x5d\x70\x8c\xa1\xd1\x3b\x8f\x87\xdb\x96\x5c\x87\xaf\xe4\x4c\xce\x47\x47\x56\xba\x96\x87\x7e\xb8\x81\x69\xf9\x0c\xed\xfd\x6f\x78\x5a\x97\xe0\xb0\xe1\xa4\xff\x57\xcb\x8b\x3f\x01\x00\x00\xff\xff\xfc\x61\x6a\x79\x49\x03\x00\x00"
  98. func indexHtmlBytes() ([]byte, error) {
  99. return bindataRead(
  100. _indexHtml,
  101. "index.html",
  102. )
  103. }
  104. func indexHtml() (*asset, error) {
  105. bytes, err := indexHtmlBytes()
  106. if err != nil {
  107. return nil, err
  108. }
  109. info := bindataFileInfo{name: "index.html", size: 841, mode: os.FileMode(420), modTime: time.Unix(1435948513, 0)}
  110. a := &asset{bytes: bytes, info: info}
  111. return a, nil
  112. }
  113. var _indexJs = "\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xcc\x56\xcd\x6e\x24\x35\x10\xbe\xe7\x29\x8c\x88\xd6\x6e\x31\xf1\x4c\x96\x1b\x51\x40\x4b\x12\xc4\xcf\x42\x50\x12\x0e\x08\x71\x30\xdd\xd5\xd3\xde\xb8\xed\x96\xed\xce\x64\xc8\xce\x1b\xf0\x00\x3c\x1f\x4f\x42\xf9\xa7\x7f\x32\x9b\x04\x24\x2e\xe4\x90\xb1\xcb\xe5\xfa\xfd\xea\x6b\xb3\xba\xd7\xa5\x97\x46\xb3\x82\x3c\x1c\x1c\xdc\x09\x4b\x0e\x6b\xdb\x92\x53\x72\xc8\x68\x6d\x6c\x4b\x8b\xc5\x01\xc1\xbf\xc3\xb2\xed\x92\xf4\x63\x5c\x4d\x52\xe5\x06\xa9\x72\xa3\xb4\xb7\x2a\x4b\x71\x35\x48\x4b\xd3\x6d\xbf\x83\x2d\x1e\x68\x71\x27\xd7\xc2\x1b\xcb\x7b\x07\xf6\xcd\x1a\xb4\xe7\x52\x57\x70\x7f\x59\x33\xfa\xbd\x28\xa5\xf6\xc6\x35\xb4\x20\x9f\x9f\x92\x15\xf9\x82\xd0\xbf\xfe\xf8\xf3\xe8\x8c\x92\xcf\x08\x3d\xf3\x56\xe1\x32\x59\x54\xc2\xf9\x9f\xac\x3a\xc9\x71\x03\x9a\x1e\xd3\xd1\xa2\x85\x90\x12\x21\x16\x7c\x6f\x35\x46\x53\x99\xb2\x6f\x83\xaf\xd2\x82\xf0\x70\xa1\x20\xec\x92\x66\x71\x72\xb0\xcb\x76\x2c\x38\xf9\xfb\x23\x5b\xc9\x4e\x3a\x2b\x7d\xc8\x0c\x4b\xc4\xd7\xe0\xd9\xaa\x08\x3f\x5f\x9a\x5e\x57\x52\xaf\xcf\x94\x44\x83\x57\xa8\xc3\xd0\x1e\x49\x6a\xa5\x73\x8c\xb6\xc2\xae\xa5\x3e\xf2\xa6\xa3\x0b\xb2\xc1\x5c\xcd\x06\x33\xd6\x60\xbf\x06\xb9\x6e\xfc\xf2\x53\x72\x14\x6d\xf3\x26\xed\x5f\xcf\xe2\x09\xf1\x7d\x65\x4d\x3b\x8f\xa8\xb7\x72\x0a\xaa\x13\xd6\x87\x2e\xa0\x90\xbb\xfe\x37\xe7\x2d\xc6\xc2\x8e\x0b\xee\x3a\x25\x3d\xa3\x4b\x1a\xa3\xc9\x75\x88\xda\xbf\x1c\xff\x3a\x39\x50\x46\x54\x4f\xa7\x1b\x5c\xc7\x7e\xa5\x08\x98\x32\xa5\x08\x2a\xbc\x13\xbe\x89\x75\x8b\x69\x72\xf1\x4e\xdc\xb3\x87\xd8\x13\x6c\x38\xb6\x69\x29\x3a\xb9\xc4\xe5\x92\x92\x4f\xe2\xf5\xd4\xb0\x4a\x78\x71\xb3\xed\x00\x35\xde\x39\xa3\x29\x0a\x77\x05\x17\x6a\x23\xb6\x6e\x42\x62\xd0\x4a\x31\x10\x22\x6b\xc2\x3e\x0a\x02\x6e\x6e\x07\x19\x21\xae\x31\x9b\x0b\x6b\x8d\x8d\xba\x1c\xc2\x32\x86\x12\xfe\x52\x9e\x69\xb7\x3b\x88\x3f\xb1\x75\xa6\xf7\x21\x99\x78\x23\x6e\x16\xf9\x42\x0c\x1a\x4f\x92\xc6\xab\x57\x69\xc1\x83\xf0\xfd\x7b\x42\xe9\xc9\x08\x6a\x7e\x27\x14\xd6\x5e\x15\xbc\x46\x2c\x39\x96\x7d\xa2\xe4\x5c\x56\x67\x8d\xd0\x6b\x48\xb2\x5d\xe8\x5f\xaa\x6e\x88\xf5\xad\xd4\xb7\x4f\x83\x33\xd6\x3f\x1e\x8e\xb5\x35\x56\x22\x56\xb0\x6e\x74\xac\xde\x49\x48\x23\x4c\x20\xf7\x70\x8f\x1d\xa5\x45\xf4\xcb\x2d\xb4\xe6\x0e\xce\x70\x0e\x10\x63\x75\x5f\xde\x0e\x07\xa2\xaa\xb2\x54\xa1\xeb\xd0\xff\xec\x4b\xc4\xb9\x7c\x66\x12\xa8\xa0\xc5\x60\xc0\x7b\xcb\x68\x63\xa1\x46\xc0\x62\x80\x59\x1c\xdd\x4f\x5b\xd1\x75\xa0\xab\x1b\xc3\x42\x6c\x93\x93\xe6\x45\x27\xae\x13\x7a\xf2\x33\x06\xda\x68\x4f\xe7\x5e\x32\x5d\x3c\xef\x29\xd6\x23\x4e\x97\xb7\x42\xbb\x48\x56\x0b\x42\x5d\x29\x14\xfc\x8c\xf0\xcf\x59\xe3\x7c\x5e\x83\x82\x0c\x6d\xee\x70\x5c\x85\x83\x37\xba\xba\xb8\xf7\x21\x1e\x91\x07\x79\x41\x56\x0b\x32\x6d\x8e\x67\x13\x38\xc2\x6d\xde\xc3\x16\x9c\x13\xeb\xdc\xc6\x7f\xea\x4d\xea\xc2\x7e\xca\xa9\x63\x29\x19\x18\x0a\x93\xcd\x5c\x5c\x5d\x5d\x5e\xe1\x9c\x20\x02\x06\x4f\xff\xa9\x12\x43\x2e\x8d\xac\xe0\xdc\x8a\x0d\xd8\x0f\x47\xfe\x65\x3b\xab\x47\x76\xe6\x98\x7f\x9a\x3c\xf2\x47\x60\x18\x1b\x4c\xcc\xca\x36\x8d\x47\x98\xea\x78\x7c\x3a\x70\xf8\x30\xdb\xd3\xf0\xc6\xd1\xcd\xa7\x91\xdc\x54\xcc\x75\x8a\xff\x91\xa9\xe1\x7e\xf8\x20\xf1\x5a\x54\xf0\x8d\x66\xaf\x57\xab\x34\x8c\x04\x94\x83\x7d\x85\xcb\xde\x4f\x1a\x31\xad\x48\xd7\x98\x02\x45\x12\x6d\xa5\xc7\xd4\xc7\xac\x72\x9b\x81\x77\x16\xee\x10\x35\xe7\x50\x8b\x5e\x65\x9a\xff\x77\x4c\x39\xb0\xcd\xb3\x65\xd9\x67\x52\x9f\x88\xf2\xc7\xcb\xeb\x9b\xfc\xbd\x0b\x57\x5f\x26\x57\x3c\xfe\xf6\xfa\xf2\x07\x9e\xbe\x01\xb2\xde\xb2\x87\x7c\x2b\xfc\xdf\x15\x8f\x69\x98\xfc\x3f\x78\xf8\x64\xf2\x10\xf7\x93\xfd\xfd\x66\xbf\x60\x76\x46\xe1\x13\x73\x4f\x0c\x9f\xfb\x93\xce\xe3\x66\x46\xed\x7b\x18\x0a\x7e\x1d\xbe\x4e\xb6\x38\xc3\x9d\x12\x25\x5c\x7b\xe4\x2f\xf6\xb0\x5b\x10\xdd\x2b\x85\x13\xb1\x84\x4a\xfa\xb1\xfc\x63\x68\x03\xd5\xb3\x99\x74\x37\x7c\x0d\x42\x87\x63\xd7\x03\xc2\x6e\x61\x8b\x4f\x00\x8d\x10\x9b\xcf\x51\x9e\xf0\xa0\xd0\x21\xf0\xe1\xf9\xe3\x32\x0a\xf6\xcf\x83\x87\x00\xef\xa8\xa1\x24\x92\xcb\x87\x10\x1e\x81\x47\xe9\xf4\x46\x49\x80\x4f\x35\xde\xff\x98\xc5\xc0\xf3\x93\x05\xa9\xeb\x22\xc0\xff\x2d\xd6\x07\xf0\xf5\xc2\x68\x7a\x2c\xa1\x9f\xb4\x40\xdd\xb4\x08\x37\xf7\x2d\x85\x77\x46\x04\xfa\xae\x08\x3f\x7f\x07\x00\x00\xff\xff\x02\x84\xe0\x0d\x7b\x0a\x00\x00"
  114. func indexJsBytes() ([]byte, error) {
  115. return bindataRead(
  116. _indexJs,
  117. "index.js",
  118. )
  119. }
  120. func indexJs() (*asset, error) {
  121. bytes, err := indexJsBytes()
  122. if err != nil {
  123. return nil, err
  124. }
  125. info := bindataFileInfo{name: "index.js", size: 2683, mode: os.FileMode(420), modTime: time.Unix(1436043487, 0)}
  126. a := &asset{bytes: bytes, info: info}
  127. return a, nil
  128. }
  129. // Asset loads and returns the asset for the given name.
  130. // It returns an error if the asset could not be found or
  131. // could not be loaded.
  132. func Asset(name string) ([]byte, error) {
  133. cannonicalName := strings.Replace(name, "\\", "/", -1)
  134. if f, ok := _bindata[cannonicalName]; ok {
  135. a, err := f()
  136. if err != nil {
  137. return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
  138. }
  139. return a.bytes, nil
  140. }
  141. return nil, fmt.Errorf("Asset %s not found", name)
  142. }
  143. // MustAsset is like Asset but panics when Asset would return an error.
  144. // It simplifies safe initialization of global variables.
  145. func MustAsset(name string) []byte {
  146. a, err := Asset(name)
  147. if (err != nil) {
  148. panic("asset: Asset(" + name + "): " + err.Error())
  149. }
  150. return a
  151. }
  152. // AssetInfo loads and returns the asset info for the given name.
  153. // It returns an error if the asset could not be found or
  154. // could not be loaded.
  155. func AssetInfo(name string) (os.FileInfo, error) {
  156. cannonicalName := strings.Replace(name, "\\", "/", -1)
  157. if f, ok := _bindata[cannonicalName]; ok {
  158. a, err := f()
  159. if err != nil {
  160. return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
  161. }
  162. return a.info, nil
  163. }
  164. return nil, fmt.Errorf("AssetInfo %s not found", name)
  165. }
  166. // AssetNames returns the names of the assets.
  167. func AssetNames() []string {
  168. names := make([]string, 0, len(_bindata))
  169. for name := range _bindata {
  170. names = append(names, name)
  171. }
  172. return names
  173. }
  174. // _bindata is a table, holding each asset generator, mapped to its name.
  175. var _bindata = map[string]func() (*asset, error){
  176. "close.svg": closeSvg,
  177. "index.css": indexCss,
  178. "index.html": indexHtml,
  179. "index.js": indexJs,
  180. }
  181. // AssetDir returns the file names below a certain
  182. // directory embedded in the file by go-bindata.
  183. // For example if you run go-bindata on data/... and data contains the
  184. // following hierarchy:
  185. // data/
  186. // foo.txt
  187. // img/
  188. // a.png
  189. // b.png
  190. // then AssetDir("data") would return []string{"foo.txt", "img"}
  191. // AssetDir("data/img") would return []string{"a.png", "b.png"}
  192. // AssetDir("foo.txt") and AssetDir("notexist") would return an error
  193. // AssetDir("") will return []string{"data"}.
  194. func AssetDir(name string) ([]string, error) {
  195. node := _bintree
  196. if len(name) != 0 {
  197. cannonicalName := strings.Replace(name, "\\", "/", -1)
  198. pathList := strings.Split(cannonicalName, "/")
  199. for _, p := range pathList {
  200. node = node.Children[p]
  201. if node == nil {
  202. return nil, fmt.Errorf("Asset %s not found", name)
  203. }
  204. }
  205. }
  206. if node.Func != nil {
  207. return nil, fmt.Errorf("Asset %s not found", name)
  208. }
  209. rv := make([]string, 0, len(node.Children))
  210. for childName := range node.Children {
  211. rv = append(rv, childName)
  212. }
  213. return rv, nil
  214. }
  215. type bintree struct {
  216. Func func() (*asset, error)
  217. Children map[string]*bintree
  218. }
  219. var _bintree = &bintree{nil, map[string]*bintree{
  220. "close.svg": &bintree{closeSvg, map[string]*bintree{
  221. }},
  222. "index.css": &bintree{indexCss, map[string]*bintree{
  223. }},
  224. "index.html": &bintree{indexHtml, map[string]*bintree{
  225. }},
  226. "index.js": &bintree{indexJs, map[string]*bintree{
  227. }},
  228. }}
  229. // RestoreAsset restores an asset under the given directory
  230. func RestoreAsset(dir, name string) error {
  231. data, err := Asset(name)
  232. if err != nil {
  233. return err
  234. }
  235. info, err := AssetInfo(name)
  236. if err != nil {
  237. return err
  238. }
  239. err = os.MkdirAll(_filePath(dir, path.Dir(name)), os.FileMode(0755))
  240. if err != nil {
  241. return err
  242. }
  243. err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())
  244. if err != nil {
  245. return err
  246. }
  247. err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
  248. if err != nil {
  249. return err
  250. }
  251. return nil
  252. }
  253. // RestoreAssets restores an asset under the given directory recursively
  254. func RestoreAssets(dir, name string) error {
  255. children, err := AssetDir(name)
  256. // File
  257. if err != nil {
  258. return RestoreAsset(dir, name)
  259. }
  260. // Dir
  261. for _, child := range children {
  262. err = RestoreAssets(dir, path.Join(name, child))
  263. if err != nil {
  264. return err
  265. }
  266. }
  267. return nil
  268. }
  269. func _filePath(dir, name string) string {
  270. cannonicalName := strings.Replace(name, "\\", "/", -1)
  271. return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
  272. }