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