From b73317c2495344ef3aef69fe62e96748694ccefd Mon Sep 17 00:00:00 2001 From: Daan Sprenkels Date: Wed, 22 Apr 2020 19:05:56 +0200 Subject: [PATCH] Add generated bindata.go file to repo --- .gitignore | 3 - bindata.go | 484 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 484 insertions(+), 3 deletions(-) create mode 100644 bindata.go diff --git a/.gitignore b/.gitignore index 44b4515..ee59860 100644 --- a/.gitignore +++ b/.gitignore @@ -14,9 +14,6 @@ # Dependency directories (remove the comment below to include it) # vendor/ -# Generated code from assets using bindata -bindata.go - # Output binary /rushlink diff --git a/bindata.go b/bindata.go new file mode 100644 index 0000000..4522d2d --- /dev/null +++ b/bindata.go @@ -0,0 +1,484 @@ +// Code generated for package rushlink by go-bindata DO NOT EDIT. (@generated) +// sources: +// assets/css/main.css +// assets/js/copyclipboard.js +// assets/js/dragdrop.js +// assets/templates/html/base.html.tmpl +// assets/templates/html/error.html.tmpl +// assets/templates/html/index.html.tmpl +// assets/templates/html/pasteMeta.html.tmpl +// assets/templates/txt/base.txt.tmpl +// assets/templates/txt/error.txt.tmpl +// assets/templates/txt/index.txt.tmpl +// assets/templates/txt/pasteMeta.txt.tmpl +package rushlink + +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 +} + +// Name return file name +func (fi bindataFileInfo) Name() string { + return fi.name +} + +// Size return file size +func (fi bindataFileInfo) Size() int64 { + return fi.size +} + +// Mode return file mode +func (fi bindataFileInfo) Mode() os.FileMode { + return fi.mode +} + +// Mode return file modify time +func (fi bindataFileInfo) ModTime() time.Time { + return fi.modTime +} + +// IsDir return file whether a directory +func (fi bindataFileInfo) IsDir() bool { + return fi.mode&os.ModeDir != 0 +} + +// Sys return file is sys mode +func (fi bindataFileInfo) Sys() interface{} { + return nil +} + +var _cssMainCss = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x5c\x51\xd1\x6e\xc3\x20\x0c\x7c\xcf\x57\x58\xaa\x26\x6d\x55\xd3\xd2\xa9\x5d\x57\xf2\x27\x7b\x23\xc1\x49\xac\x11\x8c\x80\xae\x49\xa7\xfe\xfb\x94\x84\xac\xd3\x10\x02\x7c\x77\x36\x27\xbb\x64\x3d\xc0\x77\x06\x00\x50\xb3\x8d\x79\xad\x3a\x32\x83\x84\x8e\x2d\x07\xa7\x2a\x2c\xb2\x7b\x96\xad\xb4\x67\xf7\xc1\x16\x93\xb4\x54\xd5\x67\xe3\xf9\x62\x75\x5e\xb1\x61\x2f\xc1\x37\xa5\x7a\x16\x1b\x18\xf7\xf6\x75\x3c\x4e\xc7\x97\x62\x12\x27\xc5\xb5\xa5\x88\xc5\xe3\xa7\x40\x37\x94\xf0\x26\x5c\xff\x07\xbc\x22\x35\x6d\x94\x50\xb2\xd1\x33\xdc\x26\x64\x2f\xc4\x53\x01\xcb\x9a\x28\x83\x75\x94\x20\x8a\x39\x72\x4a\x6b\xb2\x8d\x84\x3d\x76\x73\xaa\xe3\x40\x91\xd8\x4a\xa8\xa9\xc7\x54\x2f\xb2\x1b\x73\xe6\xb7\x57\x76\x91\x7c\x51\xa0\x92\x0c\xc5\x01\xf6\xa7\x63\x17\x36\xc0\x4e\x55\xbf\xe1\x9c\x70\x25\x1d\xdb\xe4\x65\x02\x6e\x39\x59\x8d\xbd\x84\xf3\xf9\xfc\x70\x97\x3c\xde\xb3\xcc\xf9\xa5\x65\xc9\x5e\x3e\x9b\x3e\x60\x5f\xc0\x6e\x0d\xca\x39\xcf\x3d\x1c\x1e\xfd\xd6\x30\x5d\x01\xd6\xbb\xb1\xc0\x36\x5c\xaa\x0a\x43\x48\x55\x52\x2f\x57\x42\xbc\x0b\x21\xa6\xd9\x6c\x6b\x45\xe6\x1f\x3d\x92\x0b\xdd\x92\xd6\x68\x93\x40\x53\x70\x46\x0d\x12\x2c\xdb\x69\xb4\x3f\x01\x00\x00\xff\xff\x22\xc0\x9d\x3a\x00\x02\x00\x00") + +func cssMainCssBytes() ([]byte, error) { + return bindataRead( + _cssMainCss, + "css/main.css", + ) +} + +func cssMainCss() (*asset, error) { + bytes, err := cssMainCssBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "css/main.css", size: 512, mode: os.FileMode(420), modTime: time.Unix(1587564030, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _jsCopyclipboardJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x54\x4f\x6b\xe3\x3e\x10\xbd\xfb\x53\x4c\x75\xb2\xc9\x0f\xf3\x3b\xd7\x78\xa1\x4d\xbb\x10\x28\x4d\x69\xdc\xc3\x9e\x82\x2a\x4d\x1c\xb1\xb2\x14\xa4\x71\xd2\xb2\xf8\xbb\x2f\xb2\xe3\xc4\xf9\xcb\xf6\x50\x1f\x12\x12\x8f\xde\xcc\x7b\x6f\x9e\x58\xed\x11\x3c\x39\x25\x88\x65\x51\x24\xac\xf1\x04\xe3\xe9\xcb\xaf\x79\x31\x9d\x8f\x9f\x26\x2f\xf7\xd3\xbb\xd7\x87\xf9\x78\xfa\x5c\xdc\x4d\x9e\x1f\x5f\xe7\x93\x07\xc8\x81\x09\xbb\xfa\x2c\xec\x58\xab\xd5\xbb\xe5\x4e\x8e\xad\x21\xae\x0c\x3a\x96\x5d\x84\x98\x15\x77\xc5\xdb\xec\xfc\xf9\x19\x71\xaa\x3d\xcb\x22\x8d\x04\xc7\xd8\xe4\x20\x87\xff\xb3\x28\x5a\xd4\x46\x90\xb2\xe6\xb8\x62\x56\x0b\x81\xde\xc7\x09\xfc\x89\x00\x00\x02\x88\x6f\x11\x1f\x35\x56\x90\x83\xb4\xa2\xae\xd0\x50\x5a\x22\x85\xbf\xd0\xd0\xfd\xe7\x44\xc6\x57\x86\x4c\xb2\x16\x6a\x0f\x93\x2a\x63\xd0\x15\xf8\x41\x61\xfe\xb7\xd7\xa7\x30\x85\x42\x79\xc3\x4e\x2a\x85\xe6\xde\x3f\x29\x4f\xa9\xc3\xca\xae\x31\x66\x0b\xae\x34\x3b\x85\xdc\x17\x72\x29\x63\xe6\x3b\x1e\xa1\xb0\xb9\xcc\xf6\x27\x57\x3a\x16\xbc\xf6\xf8\x0d\x7c\xd5\x02\xe2\x9b\x2d\x78\xfb\x15\xc8\xd6\xe6\xb7\xb1\x1b\x03\xe8\x9c\x75\x5b\xba\xa1\x67\xe5\xcb\xde\x4b\x08\x0c\x51\xde\x02\x83\x51\x77\xb0\x2b\x0b\xcb\x60\x35\xa6\xda\x96\x71\xe5\xcb\xeb\xaa\x56\xbe\xfc\x07\x2d\x07\x2a\x5d\x97\xb3\x17\xfd\x8a\x96\x71\xed\xf4\x50\xc5\xf0\xfa\x71\x8d\x86\x26\xf2\x03\x72\x18\x8d\x4e\x77\x31\x8b\xf6\x42\x6d\x94\x91\x76\x93\x1a\xbe\x56\x25\x27\xeb\x52\xd1\x17\xf6\xa0\x9d\x06\xa7\xfe\x31\x61\x6b\x2d\xc1\x58\x02\xde\xd2\x81\xdd\xd1\x9e\x58\x78\x1c\x52\xed\x4c\xf7\xbb\x69\x3f\x2f\xb7\x4c\x37\x4e\x11\x06\x29\x5b\x56\x29\x2d\xd1\xc4\x71\x02\xf9\x8f\xc1\x2c\x61\xec\x33\xf9\xba\xc9\xf3\x03\xee\xc9\x41\xe7\x33\x24\x76\x91\xdb\xce\xf6\x1f\x7c\x57\xa7\x56\xae\xbe\x4d\xe7\x66\xbc\xb3\x73\x17\xf9\x2f\xd8\x31\xdc\x5c\x6e\xce\x3a\x90\x1d\xb0\xd8\xc2\x6a\x2b\x78\x68\x9a\xae\x9c\x25\x2b\xac\x6e\xb9\xb0\x25\xd1\xca\xdf\xb2\x61\x87\xf0\x84\x0e\xa3\x1c\xd8\x2d\x6c\xf0\xdd\x2b\xc2\xd6\xeb\xda\x2b\x53\x42\x7b\x84\xed\xca\x9b\x01\xf5\x2e\x2d\x6d\xd0\x06\x79\x69\x00\xb5\xc7\x23\x0e\xa2\xbf\x73\xbf\x14\xf8\xe1\x45\x9e\x0c\x45\xdf\x82\x9d\x09\xdc\x52\x49\x89\xa6\x5f\xcb\x26\x6a\x92\xe0\xc7\xdf\x00\x00\x00\xff\xff\x70\xbd\x7a\x61\x39\x06\x00\x00") + +func jsCopyclipboardJsBytes() ([]byte, error) { + return bindataRead( + _jsCopyclipboardJs, + "js/copyclipboard.js", + ) +} + +func jsCopyclipboardJs() (*asset, error) { + bytes, err := jsCopyclipboardJsBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "js/copyclipboard.js", size: 1593, mode: os.FileMode(420), modTime: time.Unix(1587564030, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _jsDragdropJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x94\x95\xcd\x6e\xdb\x46\x10\xc7\xef\x7e\x8a\x01\x7b\xa0\x08\x28\x94\x22\x20\x8e\x11\xd5\x39\xb4\x4e\xd1\x02\x4d\xd3\x83\x8d\x02\xbd\x0d\x77\x47\xe4\xd4\xab\x5d\x62\x77\x24\x86\x28\x72\xeb\x93\xf4\xd1\xfa\x24\xc5\x2e\x3f\x2c\xb7\xb6\x63\x9f\x04\x91\xf3\xf1\x9b\xff\xfc\x97\x9b\x1d\x02\x41\x10\xcf\x4a\xb2\xed\xd9\x59\xc7\x56\xbb\xae\x44\xad\x3f\x1c\xc9\xca\xcf\x1c\x84\x2c\xf9\x45\x7e\xf5\xe9\xe3\xf7\xce\x4a\x7c\xe6\x50\x93\xce\x97\xb0\xa0\x18\x52\xc0\xe5\x7b\xf8\xf3\x0c\x00\x60\xb5\x82\xeb\x86\x80\xf7\xad\xa1\x3d\x59\x41\x61\x67\xc1\xed\x40\x1a\x0e\xa0\x3d\xd6\xaf\xb4\x77\x2d\x18\x57\xb3\x02\x0e\x60\xd0\xd7\x64\x7a\xa8\x30\x90\x06\x67\x41\x1a\x9a\x2a\xa1\x0d\x1d\x79\xd0\x14\x94\xe7\x8a\x34\xb0\x85\x6f\x1b\x91\x36\xbc\x5b\xad\x82\xa0\xba\x75\x47\xf2\x3b\xe3\xba\x52\xb9\xfd\x0a\x57\x9b\x8b\xcd\xe6\x7c\xbd\xd9\xac\xde\x6c\xd6\x6f\xd7\x17\xaf\xdf\x97\x63\xa9\x53\xb6\x9a\x83\xc4\xce\x91\xe8\x1d\xd0\x91\x7c\x0f\xc2\x7b\x8a\x9d\x13\x21\x90\x15\xf2\x01\x10\x2c\x75\x70\xf5\xe9\x23\xb8\xea\x0f\x52\xb2\x04\x16\xe8\xd8\x98\xa9\xda\x8e\x3d\x8d\x51\x79\x4c\x4c\x79\x39\x24\x4d\x86\x51\x50\x80\x06\x21\x4a\x80\xeb\xf8\x97\x63\xdd\x16\xd9\x2e\xa1\x22\x85\x87\x30\x4f\xdb\x11\x68\x07\xd6\x09\xdc\x5a\xd7\x41\xd7\xb0\x6a\xa6\xec\xd4\x16\xaa\x81\xd1\x60\x10\x10\x07\x9e\x14\xf1\x31\x12\xc4\xe6\x86\xf0\x38\xd7\x4a\x08\xcb\xa8\x97\xc2\x30\x64\x1d\x02\x79\xc0\xca\x79\x09\xe9\x7f\xeb\x9d\xa2\x10\x1e\x50\xc8\xd3\xce\x79\x5a\x46\xa0\xe8\x0c\xb4\x70\x53\x9b\x1e\x7e\x44\x75\xfb\xcf\x5f\x7f\xa7\x41\xc8\xd3\x8c\x84\xf6\x84\x52\x1a\x60\x3d\xd5\xca\xe3\xaa\x7f\x77\x96\xf2\xe5\x38\x4e\x65\x9c\xba\x1d\xfa\x2b\x17\x3d\x22\x04\x2d\xd6\x54\x02\xfc\xd6\x90\x05\xfc\xbf\x90\x53\x31\x0e\xd3\xc0\xc9\x26\x68\xfb\xb4\x9a\xb1\x75\xa2\x4d\x44\x07\xdb\xb0\xa6\xc1\x6f\x7b\xa7\xd1\xa4\x06\xaf\x52\x67\xf2\xe5\xdd\x9c\x1c\x86\x84\xfa\x80\x1e\xad\x50\x9c\x76\x58\x59\xc4\xb3\xf4\x59\x20\xbf\xb7\xd1\x69\xe0\x13\x8c\xa9\x5a\xea\x76\xd7\xe7\xde\xd2\x39\x4c\xf9\x04\xa1\x41\x63\x80\x6b\xeb\x3c\x3d\xa0\xbc\x8d\x3a\x91\x8d\x9e\xbc\xdb\x59\x10\xd7\xc6\x7f\xec\x07\x77\xa2\x8a\x67\xea\x6e\xe0\xc9\x06\x27\x07\x27\x9f\x0d\x91\x8f\x47\x0a\xf2\x6f\xe6\x65\x9c\xd0\xfd\x12\x8d\x46\x93\xe1\xc8\x02\x7d\x46\x25\xa6\x9f\x4f\xe0\x69\xcb\xb8\x02\x85\x56\x91\x31\xa4\x61\x81\x56\xcf\x0c\xa3\xe4\x34\x2a\x3e\x36\x98\xab\x28\xe5\xbc\x66\x5b\x9b\xbe\x28\xcf\xd2\x53\x43\x02\x13\x10\x5c\x82\x76\xea\x90\x90\x6a\x92\x0f\x43\xf2\x77\xfd\x4f\x7a\x91\x4d\x31\x59\xb1\x4d\x79\x8f\x7d\x9c\xb2\xd9\x36\xd9\x03\x5f\xa5\x91\xe3\x66\x90\x13\xe3\x11\xb8\x37\xd9\x1c\x34\xb5\x2b\x83\xf4\x86\xca\x23\x07\xae\xd8\xb0\xf4\x70\x09\x59\xb6\x7d\x2c\xce\xb5\xa8\x86\xa0\xd7\x43\xcc\x97\x62\x3b\xcc\x39\x07\x3e\x44\xec\xda\xaf\xc1\xc6\x98\xc8\xba\x63\x43\xf3\xcb\x94\x50\xb6\x3e\xfd\x5e\xd1\x0e\x0f\x46\x16\xc5\x09\xdc\x63\x62\xc6\x2a\x37\xad\x71\xa8\x7f\x60\x32\x3a\x2b\xca\xf8\x24\xc0\xe5\x58\x52\xa3\xe0\xb5\x47\x1b\x76\xe4\x87\x57\x2f\x2b\xea\xfc\x3e\x2b\xca\x70\xa8\xf6\x3c\x03\x3d\x4f\x89\xd1\xad\x5f\x93\x63\x70\x5f\x78\xf9\xea\x1a\xd6\x9a\xec\x73\x16\xb8\xfe\x0f\xf6\x93\x86\x8b\xd7\xcf\x13\xcc\xbf\x0e\x2b\x4a\x07\xa3\xf2\xae\x8b\x23\xec\xbc\xdb\x83\x6b\xc9\xb2\xad\xd3\x8b\xa8\xdf\x7c\x17\xc4\x9b\x12\x13\xdc\xc9\xc7\x6f\xac\x36\x1e\xe4\x11\x08\x60\xf1\xe4\x55\x78\xfe\xf6\xcd\xf9\xf9\xc5\x7a\xbe\x09\x8b\x67\xd9\x27\x8e\xfd\xa5\xd8\xfe\x1b\x00\x00\xff\xff\xdf\xfa\x50\xb3\x12\x08\x00\x00") + +func jsDragdropJsBytes() ([]byte, error) { + return bindataRead( + _jsDragdropJs, + "js/dragdrop.js", + ) +} + +func jsDragdropJs() (*asset, error) { + bytes, err := jsDragdropJsBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "js/dragdrop.js", size: 2066, mode: os.FileMode(420), modTime: time.Unix(1576493365, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _templatesHtmlBaseHtmlTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x90\x31\x6f\x84\x30\x0c\x85\xf7\xfb\x15\xae\x77\xc8\xda\x21\xb0\xb4\x9d\x7b\x43\x97\x8e\x39\xf0\x29\xe8\x0c\x87\x12\x9f\x54\x14\xe5\xbf\x57\x38\x55\xc3\x70\x13\xb6\x1f\x7e\x9f\x5f\xec\xcb\xfb\xe7\xdb\xd7\xf7\xf9\x03\xbc\xcc\xdc\x9f\x6c\xf9\x00\x00\x58\x4f\x6e\x2c\xa5\xb6\x33\x89\x83\xc1\xbb\x10\x49\x3a\x7c\xc8\xb5\x79\xc5\x83\x2c\x93\x30\xf5\x29\x5d\xf8\x3e\xdc\x00\xb5\x45\x68\x73\x0e\x8f\xe8\x79\x5a\x6e\x29\xd1\x32\xe6\x6c\x4d\xf9\xb3\x6e\xee\x22\x04\xe2\x0e\xa3\x6c\x4c\xd1\x13\x09\x82\x6c\x2b\x75\x28\xf4\x23\x66\x88\x11\xc1\x07\xba\x76\xb8\xd7\x66\x76\xd3\xd2\xea\xd0\x54\x9b\x7f\xf2\x7e\x76\xe3\xd6\x95\x96\x51\xf9\xca\x85\x26\xe7\x92\xca\xd4\x58\xf6\x72\x1f\xb7\x27\x0e\xfb\x58\x57\xeb\x8d\x6b\xa0\xfe\x94\xd2\xe0\x98\xa1\x3d\x07\x3a\x6a\x46\xc5\xea\xa2\x31\xff\x60\x85\x60\x8d\x3e\xeb\x6f\x00\x00\x00\xff\xff\x1e\x3c\x4d\x87\x6d\x01\x00\x00") + +func templatesHtmlBaseHtmlTmplBytes() ([]byte, error) { + return bindataRead( + _templatesHtmlBaseHtmlTmpl, + "templates/html/base.html.tmpl", + ) +} + +func templatesHtmlBaseHtmlTmpl() (*asset, error) { + bytes, err := templatesHtmlBaseHtmlTmplBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "templates/html/base.html.tmpl", size: 365, mode: os.FileMode(420), modTime: time.Unix(1576604408, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _templatesHtmlErrorHtmlTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xaa\xae\x4e\x49\x4d\xcb\xcc\x4b\x55\x50\x2a\xc9\x2c\xc9\x49\x55\xaa\xad\xe5\x72\x2d\x2a\xca\x2f\x52\xd0\x55\x28\x2a\x2d\xce\xc8\xc9\xcc\xcb\xe6\xaa\xae\x4e\xcd\x4b\xa9\xad\x05\x04\x00\x00\xff\xff\x73\xdb\x0d\xaf\x2b\x00\x00\x00") + +func templatesHtmlErrorHtmlTmplBytes() ([]byte, error) { + return bindataRead( + _templatesHtmlErrorHtmlTmpl, + "templates/html/error.html.tmpl", + ) +} + +func templatesHtmlErrorHtmlTmpl() (*asset, error) { + bytes, err := templatesHtmlErrorHtmlTmplBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "templates/html/error.html.tmpl", size: 43, mode: os.FileMode(420), modTime: time.Unix(1568580372, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _templatesHtmlIndexHtmlTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x95\x4d\x6f\xe3\x36\x13\xc7\xef\xfc\x14\xb3\xf4\x61\x9f\x07\x88\xc5\x64\x8f\xae\x24\xf4\x0d\x01\x16\x70\x81\xc2\x5b\xa3\x40\x6f\xb4\x38\xb2\x98\x52\x1c\x81\x1c\xd9\x31\xbc\xfe\xee\x05\x29\x3b\x71\x52\x64\xd1\x00\x45\x6f\x1a\x72\xe6\x3f\xe4\x6f\x86\xa3\xe3\xd1\x60\x6b\x3d\x82\xec\x50\x9b\xb9\x1e\x06\xf4\x46\x9e\x4e\xa2\x8c\x4d\xb0\x03\x03\x1f\x06\xac\x24\xe3\x23\xab\x07\xbd\xd3\xd3\xaa\x84\x18\x9a\x4a\xaa\x87\xa8\x4c\xd0\x5b\x13\x68\x28\x1e\xa2\x04\x83\x2d\x86\xba\x54\x93\x57\x2d\x8e\x47\xf4\xe6\x74\x12\xe2\x39\xcd\x86\xcc\x21\xeb\x1b\xbb\x83\xc8\x07\x87\x95\xdc\xd9\x68\x37\xd6\x59\x3e\x2c\x3a\x6b\x0c\xfa\xef\x80\x06\xdd\x24\xfb\x56\x82\x35\x95\x4c\x19\xfe\x20\x8f\xb2\xbe\xb7\x0e\xc1\xfa\x86\x7a\xeb\xb7\x1f\x60\xf1\x73\xa9\x8c\xdd\xd5\xa2\xec\xee\xea\xd9\x6a\x0d\x83\x8e\x8c\x73\x33\xf6\x43\xa9\xba\xbb\x5a\x88\x1f\x75\x44\x03\xe4\xa1\x63\x1e\xe2\x42\xa9\xdb\xc7\xdb\x22\xb2\xba\x01\xee\x6c\x84\x68\x19\x41\x3b\x47\xfb\x08\x07\x1a\x81\x09\x50\x47\xeb\x0e\x30\x0e\x8e\xb4\x81\xd6\x3a\x8c\xa0\xbd\x81\xd8\x51\x60\xf4\xb0\x5e\x2d\x23\x8c\xd1\xfa\xad\xe0\x0e\xa1\xa1\xbe\x4f\xdb\xce\x7a\x2c\x84\x28\xbb\x4f\xf5\xef\xb8\x99\xff\xf0\xeb\xe7\x52\x75\x9f\x6a\x51\x46\x6c\xd8\x92\xaf\x05\x00\x40\xd9\x52\xe8\xf3\x9d\x92\xf0\x3a\xe7\xb8\xa7\xd0\x4b\xd0\xd9\xab\x92\x4a\x42\x8f\xdc\x91\xa9\xe4\x40\x91\x25\xa0\x6f\xa6\x2a\xf4\xa3\x63\x3b\xe8\xc0\x2a\x89\xcc\x8d\x66\x2d\x27\xd5\xac\xec\xf4\x06\x1d\x34\x4e\xc7\x58\xc9\xe4\xb1\x4c\x0b\x12\x5a\x0a\x2f\xb2\x59\x74\x46\xd6\x93\x01\x3a\x5f\x70\x51\xaa\x1c\x7d\xa5\x66\xfd\x30\xf2\xeb\x83\xe6\xd0\xeb\x14\xbf\x68\xeb\x25\x78\xdd\xe3\xe4\x27\xcf\x0d\x33\x7d\xab\x77\xeb\x7d\x19\x37\xbd\xe5\x8b\x4a\x3c\x5b\x3b\xed\x46\xac\xe4\x54\x91\x0f\x4f\xba\x65\xe6\x50\x8b\x52\x3d\x21\x7e\x0b\xf6\xb9\x76\xeb\xd5\xf2\xbf\x80\x7d\x95\xed\x15\xec\xf5\x6a\xf9\x4d\xd6\xaf\x23\xdf\x62\x7d\xf6\xbb\x80\x1a\x83\x7b\x8b\xf6\xb3\xe2\x85\xed\x3f\xc5\x7d\x8e\xfc\x26\xef\xdc\xee\x3f\x5d\xbd\x00\x78\xee\xfb\x21\x60\x2d\x66\xf0\xa2\xd1\x44\x33\x06\x07\xf3\xfb\x8f\xc9\xa8\xbe\x3f\xd0\x18\xd2\x57\x31\xf8\xed\x47\x28\x35\x74\x01\xdb\x4a\x1e\x8f\xc5\x8a\x88\xd7\xab\xe5\xe9\x24\xeb\x6b\xab\x54\xba\x16\x62\x06\x5f\xce\x6f\x31\x13\x7d\x12\x3d\x9f\xb8\x4a\x4f\x7d\xa1\x14\x3e\xea\x7e\x70\x58\x34\xd4\xab\x48\x3d\x2a\x47\x7e\xab\xc6\xe0\xde\x95\xea\xb7\x0e\xa1\xb5\x21\xf2\x74\x3f\x6a\x21\xbd\xfa\x80\x71\x74\x0c\x7b\xeb\x1c\x34\xe4\x59\x5b\x9f\xd7\xcf\x47\x40\x93\x0e\x56\x88\x99\x98\xc1\xe7\x69\x87\xb8\xc3\x90\x35\xe2\x4d\x1e\x35\x39\xb6\xb5\xde\x9c\xb7\xac\x4f\x78\x75\x02\x7b\x93\x46\x9c\x1b\x4d\x9a\x31\xb3\xeb\x8d\x3c\xc8\x68\x9f\xc6\x94\x41\x87\x8c\xaf\x92\xd2\xe6\x01\x1b\x2e\xc4\x33\x77\x1a\x39\xb5\x42\x1b\xa8\x07\xed\xa7\x4c\x43\xa0\x06\x63\x14\xad\xdd\x3a\x64\x58\x8d\xb1\x73\xd6\xff\x09\x5f\xe1\x65\x79\xe6\xef\x03\x45\x97\x99\x39\xd5\x3a\x0f\x4d\xf2\xee\x00\xf8\xc8\x41\x37\xfc\x77\x40\xf0\x3f\x5b\x60\x01\xdc\x05\xda\x83\xde\xeb\xc3\x85\x2d\xff\xff\xdf\xe8\x14\xf8\x0a\xe9\xb7\x06\x73\x0f\x77\xa2\x54\xb9\x21\x2f\xff\xa4\xbf\x02\x00\x00\xff\xff\x55\x95\x0e\x65\xfa\x06\x00\x00") + +func templatesHtmlIndexHtmlTmplBytes() ([]byte, error) { + return bindataRead( + _templatesHtmlIndexHtmlTmpl, + "templates/html/index.html.tmpl", + ) +} + +func templatesHtmlIndexHtmlTmpl() (*asset, error) { + bytes, err := templatesHtmlIndexHtmlTmplBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "templates/html/index.html.tmpl", size: 1786, mode: os.FileMode(420), modTime: time.Unix(1576794526, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _templatesHtmlPastemetaHtmlTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xcc\x54\x3d\x6f\xdb\x30\x10\xdd\xf9\x2b\x0e\x1c\xf2\x31\x48\xda\x13\x49\x05\xea\xb8\x40\x51\x0f\x85\xeb\x2c\x9d\x4c\x8b\xe7\x98\x36\x43\xb2\xe4\xa9\x89\x40\xf0\xbf\x17\x92\xfc\x91\xa2\x46\xe1\xa0\x4b\x17\x09\x3a\x3e\xbe\x7b\xef\x1d\xa9\x18\x25\xae\x95\x41\xe0\xa4\x48\x23\x4f\x89\x5d\xc7\x98\x7f\x15\x81\x30\xff\x82\x5d\x4a\x31\xe6\x9f\x94\xc6\xe9\x2b\xa5\x74\x0d\xcf\x48\x42\x0a\x12\x90\x81\x6f\xc3\x46\x2b\xb3\x63\x31\xa2\x91\x29\x31\x76\x22\xdb\xa0\x90\x99\x70\x0e\x8d\xec\x29\xcb\xd0\x78\xe5\x08\xa8\x73\x58\x71\xc2\x57\x2a\xb6\xe2\xa7\x18\xab\x1c\x82\x6f\x2a\x5e\x6c\x43\xd1\x58\xd7\x35\x5a\xb9\x95\x15\x5e\xe6\xdb\xc0\x41\xe2\x1a\x7d\x5d\x16\x23\xb4\x3e\xd7\x6b\x65\x65\x37\x34\x71\x1e\x41\xc9\x8a\xf7\x2c\x0b\x3b\x39\xf0\x4c\xac\x21\xa1\x0c\x7a\x0e\x8d\x16\x21\x54\x7c\xa3\xa4\x44\xc3\x6b\x56\xae\x5a\x22\x6b\xc0\x9a\x46\xab\x66\xf7\xc7\xd6\x9b\x3e\x8b\xb9\xb5\xf4\x38\x9f\xa5\x54\xfc\x25\x98\x5b\x5e\x4f\xac\xeb\xe0\x71\x3e\x03\xb2\x70\x34\x51\x16\x63\x8b\x1a\xca\xe0\x84\x39\xa7\xef\x1b\x09\x6a\x03\xef\x4d\x3a\x61\x6a\x56\x16\xce\x63\x3d\xd8\xa9\x59\x29\x60\xe3\x71\x5d\xf1\x0b\x85\xf0\xfa\x42\x60\x59\x88\x9a\x65\x59\xc6\x62\x54\x6b\x10\x46\xc2\x8d\x41\xd8\xa3\x7b\x49\xfd\xd3\x2b\xf3\x04\x5c\xa2\x46\x42\xc9\x6f\x21\x9f\x08\xf3\x30\x7c\x7d\xb4\x56\xa7\xc4\x5e\x14\x6d\x60\x5c\x07\xb2\x3b\x34\x77\xf0\x5e\xc5\x1f\xc6\xed\x8b\x7e\x77\x75\x84\x3d\x9c\x8a\xef\x30\x75\x01\xd7\xe0\x3b\x46\xd4\x01\x21\x3b\xef\xe0\x4a\xd3\x7d\x6b\x76\xc6\xbe\x98\xab\x27\xba\x1f\xcf\xdc\x00\xee\xcf\xef\x1d\x1c\x89\x17\x9d\xc3\x94\x58\xe8\xd3\x7a\x53\x1e\xd2\x4b\x69\x4c\xf6\x00\x55\xcf\x38\xf1\x28\x08\x65\xfe\x39\x7c\x47\x6f\x07\xc2\x66\x2c\xdd\xc1\xbe\xdf\x5b\x65\xc7\xb5\x53\xbf\x13\xc9\x40\x7f\x90\xf5\xbb\xfc\x18\x4f\x63\x1a\x6f\xca\x3f\x0c\x78\xb9\x5c\xb2\xa6\xf5\x1a\xb2\xcc\xe3\x8f\x16\x03\x01\x7f\x98\xce\xa6\x8b\x29\x07\xfe\x9f\x8f\x9a\x0f\xb3\xee\x1d\xec\xaf\xd4\xe1\xe7\xb1\x7f\xff\x0a\x00\x00\xff\xff\xde\xe1\x78\x84\xfc\x04\x00\x00") + +func templatesHtmlPastemetaHtmlTmplBytes() ([]byte, error) { + return bindataRead( + _templatesHtmlPastemetaHtmlTmpl, + "templates/html/pasteMeta.html.tmpl", + ) +} + +func templatesHtmlPastemetaHtmlTmpl() (*asset, error) { + bytes, err := templatesHtmlPastemetaHtmlTmplBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "templates/html/pasteMeta.html.tmpl", size: 1276, mode: os.FileMode(420), modTime: time.Unix(1587564030, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _templatesTxtBaseTxtTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x01\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00") + +func templatesTxtBaseTxtTmplBytes() ([]byte, error) { + return bindataRead( + _templatesTxtBaseTxtTmpl, + "templates/txt/base.txt.tmpl", + ) +} + +func templatesTxtBaseTxtTmpl() (*asset, error) { + bytes, err := templatesTxtBaseTxtTmplBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "templates/txt/base.txt.tmpl", size: 0, mode: os.FileMode(420), modTime: time.Unix(1568569370, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _templatesTxtErrorTxtTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xaa\xae\xd6\xf3\x4d\x2d\x2e\x4e\x4c\x4f\xad\xad\x05\x04\x00\x00\xff\xff\xa1\x68\xe0\xbd\x0c\x00\x00\x00") + +func templatesTxtErrorTxtTmplBytes() ([]byte, error) { + return bindataRead( + _templatesTxtErrorTxtTmpl, + "templates/txt/error.txt.tmpl", + ) +} + +func templatesTxtErrorTxtTmpl() (*asset, error) { + bytes, err := templatesTxtErrorTxtTmplBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "templates/txt/error.txt.tmpl", size: 12, mode: os.FileMode(420), modTime: time.Unix(1568575116, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _templatesTxtIndexTxtTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8c\x91\xcf\x6a\xdc\x30\x10\xc6\xef\x7a\x8a\x0f\x7c\x48\x0b\xbb\x76\x7a\x0d\x2c\xb4\x85\xed\x1f\x08\x2d\x78\xe3\x07\x50\xed\xf1\x5a\xed\x58\x63\xa4\x11\x5e\x93\xe4\xdd\x8b\x9c\x6d\xd9\x26\x3d\x44\x27\x49\xc3\xcc\xef\xe3\x37\x45\xdd\xa0\xa9\x6f\x71\xf8\xf2\xbd\xbe\xdb\x7f\xdb\xd7\x66\xf7\xfc\x18\xf3\xd1\x46\xea\x20\x1e\x83\xea\x14\x6f\xaa\xea\xfa\x74\x5d\x46\xad\x36\xd0\xc1\x45\x44\xa7\x04\xcb\x2c\x73\xc4\x22\x09\x2a\x20\x1b\x1d\x2f\x88\x83\x04\x25\x9f\x09\x11\x29\x3a\x7f\x34\x3a\x10\x5a\x19\x47\xeb\x3b\xb0\xf3\x54\x1a\x53\x14\x68\x0e\x1f\x3e\xef\x8d\x29\xd0\x4c\x2c\xb6\x83\x45\xef\x98\x4c\x9b\x02\x63\xfb\xe9\x2a\x3f\x76\xef\x17\x49\x21\xdf\xca\xc9\x1f\xaf\x70\x7f\x5f\xd6\x22\xda\xd4\xb7\x8f\x8f\xb9\xf3\x70\x66\xd9\x4c\xfb\xdb\x79\x4e\xb0\xcb\xc9\x6f\xaa\x8a\x4e\x76\x9c\x98\xca\x56\xc6\x2a\xca\x48\x15\x8b\x3f\x56\x29\xf0\xcb\x79\x77\x03\xa1\x77\x21\xea\x1a\x13\xd2\x23\x47\x0f\x14\x13\x2b\x66\xc7\x8c\x56\xbc\x5a\xe7\xd7\xff\x33\x87\xba\x4c\x2f\x4d\x61\x0a\x7c\x7d\xaa\x88\x0e\x14\xd6\x19\x71\xb3\xea\x59\x7b\x7b\xe7\xbb\x73\xc9\xf9\x5e\xc2\x68\xd5\x89\xdf\xc0\xf9\x96\x53\x97\x45\x15\x97\x85\x55\xbe\xcc\x59\x6d\x47\x4c\x4a\xcf\xa0\xf2\xe3\x27\xb5\x5a\x5e\x18\x94\xa4\x53\x52\xf4\x41\x46\x58\xff\x44\x9a\x82\xb4\x14\xa3\xe9\xdd\x91\x49\x51\xa7\x38\xb0\xf3\xbf\xf0\x80\x7f\x45\x6f\xff\x63\x43\x90\x2e\x57\x83\xbc\x3f\xf1\xbc\x80\x4e\x1a\x6c\xab\x2f\x2d\xe0\x8d\x2b\xa9\x84\x0e\x41\x66\xd8\xd9\x2e\x7f\x04\xea\xdb\x57\x2f\x16\x0f\x18\xc8\x76\xd8\x7a\xbc\x33\xbf\x03\x00\x00\xff\xff\x54\x6e\xbb\xfa\xac\x02\x00\x00") + +func templatesTxtIndexTxtTmplBytes() ([]byte, error) { + return bindataRead( + _templatesTxtIndexTxtTmpl, + "templates/txt/index.txt.tmpl", + ) +} + +func templatesTxtIndexTxtTmpl() (*asset, error) { + bytes, err := templatesTxtIndexTxtTmplBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "templates/txt/index.txt.tmpl", size: 684, mode: os.FileMode(420), modTime: time.Unix(1576794536, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _templatesTxtPastemetaTxtTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x51\xcd\x4a\x03\x31\x10\xbe\xe7\x29\x86\x78\x51\x30\xf1\x5e\xfc\x01\xdb\x15\xc4\x1e\xa4\xae\x17\x4f\x5d\x76\xa7\x36\x74\x4d\xea\x66\x96\x76\x09\xf3\xee\xb2\x49\xdd\x2d\xea\x41\xd0\x4b\x20\x33\xdf\xcc\xf7\x33\x21\xe8\x85\x73\xf4\xbc\x98\x33\x5f\x84\xa0\x1f\x0b\x4f\xa8\x1f\xb0\x63\x0e\x41\xdf\x99\x1a\xb3\x3d\x31\x0b\xa5\x94\x08\xc1\xac\xa0\xb0\x15\x9c\x5a\x84\x03\xf2\x89\x8a\xf8\x36\xc6\xbe\x82\xac\xb0\x46\xc2\x4a\x9e\x81\x9e\x16\x76\x16\x7f\xb7\xce\xd5\xcc\x62\x67\x68\x0d\xa9\x0f\xe4\x36\x68\x27\xf0\x4b\xee\x9b\x34\x95\xf7\x43\x57\x03\x6c\x36\x16\x99\x45\x08\x58\x7b\x04\xf5\x33\xd1\x65\x6b\x37\xd6\xed\xec\x75\x8f\xb3\x55\x0f\xa3\x6e\x8b\x51\x41\xda\x96\x77\x5b\x64\x16\xbe\x77\x73\x54\x8e\xee\xe2\x7a\xb3\xfa\x74\x9c\x9b\x37\x9c\x36\x58\x10\x56\xfa\xde\xbf\x60\xe3\x22\x6d\x99\x4a\x13\x38\x70\x1d\x4b\x1a\x7a\x23\xdf\xb8\x24\xa9\x4f\xaa\xc4\xb7\x80\x86\x18\x99\xc5\xdf\x0e\xb0\x5c\x2e\xc5\x09\xe4\x6e\xc8\x66\x6d\xfc\xd7\x00\xce\x01\xf7\x58\xb6\x84\x13\x51\xb6\x4d\x0d\x4a\x35\xf8\xde\xa2\x27\x90\xb3\x6c\x9e\xe5\x99\x04\xf9\x7f\x57\x93\x51\x53\x34\xcf\x2c\x3e\x02\x00\x00\xff\xff\x21\x52\x69\xa1\x8a\x02\x00\x00") + +func templatesTxtPastemetaTxtTmplBytes() ([]byte, error) { + return bindataRead( + _templatesTxtPastemetaTxtTmpl, + "templates/txt/pasteMeta.txt.tmpl", + ) +} + +func templatesTxtPastemetaTxtTmpl() (*asset, error) { + bytes, err := templatesTxtPastemetaTxtTmplBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "templates/txt/pasteMeta.txt.tmpl", size: 650, mode: os.FileMode(420), modTime: time.Unix(1576577563, 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){ + "css/main.css": cssMainCss, + "js/copyclipboard.js": jsCopyclipboardJs, + "js/dragdrop.js": jsDragdropJs, + "templates/html/base.html.tmpl": templatesHtmlBaseHtmlTmpl, + "templates/html/error.html.tmpl": templatesHtmlErrorHtmlTmpl, + "templates/html/index.html.tmpl": templatesHtmlIndexHtmlTmpl, + "templates/html/pasteMeta.html.tmpl": templatesHtmlPastemetaHtmlTmpl, + "templates/txt/base.txt.tmpl": templatesTxtBaseTxtTmpl, + "templates/txt/error.txt.tmpl": templatesTxtErrorTxtTmpl, + "templates/txt/index.txt.tmpl": templatesTxtIndexTxtTmpl, + "templates/txt/pasteMeta.txt.tmpl": templatesTxtPastemetaTxtTmpl, +} + +// 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{ + "css": &bintree{nil, map[string]*bintree{ + "main.css": &bintree{cssMainCss, map[string]*bintree{}}, + }}, + "js": &bintree{nil, map[string]*bintree{ + "copyclipboard.js": &bintree{jsCopyclipboardJs, map[string]*bintree{}}, + "dragdrop.js": &bintree{jsDragdropJs, map[string]*bintree{}}, + }}, + "templates": &bintree{nil, map[string]*bintree{ + "html": &bintree{nil, map[string]*bintree{ + "base.html.tmpl": &bintree{templatesHtmlBaseHtmlTmpl, map[string]*bintree{}}, + "error.html.tmpl": &bintree{templatesHtmlErrorHtmlTmpl, map[string]*bintree{}}, + "index.html.tmpl": &bintree{templatesHtmlIndexHtmlTmpl, map[string]*bintree{}}, + "pasteMeta.html.tmpl": &bintree{templatesHtmlPastemetaHtmlTmpl, map[string]*bintree{}}, + }}, + "txt": &bintree{nil, map[string]*bintree{ + "base.txt.tmpl": &bintree{templatesTxtBaseTxtTmpl, map[string]*bintree{}}, + "error.txt.tmpl": &bintree{templatesTxtErrorTxtTmpl, map[string]*bintree{}}, + "index.txt.tmpl": &bintree{templatesTxtIndexTxtTmpl, map[string]*bintree{}}, + "pasteMeta.txt.tmpl": &bintree{templatesTxtPastemetaTxtTmpl, 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, "/")...)...) +}