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