1
0
Fork 0
mirror of https://github.com/Luzifer/badge-gen.git synced 2024-12-24 10:21:17 +00:00
badge-gen/bindata.go

284 lines
1.5 MiB
Go
Raw Permalink Normal View History

2016-06-28 21:56:22 +00:00
// Code generated by go-bindata.
// sources:
// assets/DejaVuSans.ttf
// assets/badgeTemplate.tpl
// assets/demoPage.tpl.html
// DO NOT EDIT!
2015-05-25 12:11:55 +00:00
package main
import (
"bytes"
"compress/gzip"
"fmt"
"io"
2016-06-28 21:56:22 +00:00
"io/ioutil"
"os"
"path/filepath"
2015-05-25 12:11:55 +00:00
"strings"
2016-06-28 21:56:22 +00:00
"time"
2015-05-25 12:11:55 +00:00
)
2016-06-28 21:56:22 +00:00
func bindataRead(data []byte, name string) ([]byte, error) {
2015-05-25 12:11:55 +00:00
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)
2016-06-28 21:56:22 +00:00
clErr := gz.Close()
2015-05-25 12:11:55 +00:00
if err != nil {
return nil, fmt.Errorf("Read %q: %v", name, err)
}
2016-06-28 21:56:22 +00:00
if clErr != nil {
return nil, err
}
2015-05-25 12:11:55 +00:00
return buf.Bytes(), nil
}
2016-06-28 21:56:22 +00:00
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 _assetsDejavusansTtf = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xec\xbd\x0b\x78\x14\x45\xf6\x37\x5c\x55\x7d\x99\x9e\x6b\xe6\xd2\x49\x0f\x81\x24\x03\x81\x24\x40\x04\x44\xc4\x80\x88\x88\x11\x90\xbb\x21\x22\x22\x22\xe1\x12\x6e\x21\x60\x8c\x88\x08\x88\x2c\x22\xb2\x2c\x46\x44\x16\x11\x59\x16\x59\x40\x44\x44\x44\x60\x11\x11\x11\x59\x56\x91\x45\x50\x64\x11\x59\x16\x59\x8c\x81\x45\x84\x70\x11\x30\xf3\x9d\x3a\xd5\x93\xe9\xdc\x10\xd4\xdd\xbf\xdf\xfb\xec\xd4\x73\x7e\x75\xa6\xba\xba\xba\xaa\xce\xa9\x53\xa7\x6a\xba\x7b\x08\x25\x84\xe8\x00\x32\x69\xd7\xa1\x43\x76\xb7\xd1\xad\x16\x6e\x20\x84\x76\x85\xd4\x3a\x1d\x33\xef\xe8\x30\x27\x79\x56\x7b\xf8\x3e\x8c\x10\x36\xa7\x63\xcf\x1e\xbd\x16\x2d\x48\x39\x47\x88\x74\x99\x90\x85\x89\x1d\x7b\xdd\xdd\xfe\xcf\xef\x66\xf4\x25\x64\x71\x1d\x42\x62\x0f\x75\xbb\x2d\xbb\xd3\xb2\x40\xcb\xc9\x84\xac\x87\xe3\x6a\xdb\x1e\xbd\x9a\x36\xbf\xf7\xba\xb1\xd7\x11\xb2\xb9\x0d\x94\xd7\x7b\xd0\xa8\x9c\x31\xea\xb3\xef\x7d\x08\xdf\xe7\x10\x12\x77\x72\xd0\xd8\xc2\x10\x19\x9e\xd0\x8a\x90\xcf\xa6\xc2\x35\xca\x72\xc7\x0c\x1d\xf5\x60\x8b\xb1\x23\x08\xf9\x1c\xbe\x93\x57\x87\xe6\x3c\x34\x86\xd8\x20\x90\xfd\xcd\xe0\xbb\x6b\x68\xde\xa3\xb9\xc3\xa6\x0e\xbb\x1e\xbe\xb7\x21\xda\xa3\xfd\x86\x0d\xc9\x19\xac\xdd\xbf\xf5\x29\x62\xbf\x6b\x1e\x1c\x6f\x39\x0c\x12\xdc\x7f\x48\x7a\x17\xbe\xef\x86\xef\xf5\x87\x8d\x2a\x1c\xf7\xc1\x8d\xfb\x7f\x80\xef\xa5\x84\xe4\xe4\x8e\x1c\x52\x90\xef\x78\x47\xbd\x83\xd8\xdf\xec\x47\xc8\xad\x97\xf3\x46\x0f\xca\x19\x30\x77\xfb\x4c\x62\x3f\xd3\x07\x8e\x4f\x1f\x95\x33\x6e\x4c\x9d\x5d\xea\x83\xc4\x91\x7d\x18\xce\x0f\xe5\xe7\x8c\x1a\x92\x34\xaa\xdb\x1f\x89\xe3\x6e\xf8\x7a\x8b\x36\x66\xf4\x43\x85\x21\xdb\xb8\x59\xc4\x31\x5b\x23\xe4\xbb\xb3\x63\x0a\x86\x8c\xb9\xd9\xf6\x1d\x21\x4e\x5e\x5d\x05\xfa\x08\x7b\x93\xec\xbc\x65\xf1\xdf\x78\xfc\xc9\xc4\x1f\x4a\xcb\x63\x7e\xc4\x03\xbd\x98\xc6\x78\x5b\x18\xb9\x97\x48\x6c\x35\xa1\xec\x0d\xf6\x01\x70\xdb\xd9\x76\xe0\xff\xc2\x3e\x04\xfe\x23\xb6\x13\xf8\x8f\xd9\x27\xc0\xef\x61\x7b\x81\xff\x94\x1d\x05\xfe\x5f\xec\x1b\xe0\x4b\xd8\x19\xe0\x4b\x19\x94\xc8\xce\xb2\xb3\xc0\x9f\x63\xe7\x80\x3f\xcf\xc2\x44\x92\x88\x04\x75\x90\xa8\x24\x03\xaf\x48\x0a\xf0\xaa\xa4\x02\x6f\x93\x6c\xc0\x6b\x92\x1d\x78\x87\xe4\x00\xde\x29\xb9\x80\x77\xcb\x71\x84\xca\x86\x5c\x9b\x48\x72\x1d\xc5\x45\xa8\xe2\x56\xdc\x84\x29\x1e\x25\x06\x78\xaf\x12\x24\x92\x52\x4b\x89\x07\xbe\xb6\x92\x00\x7c\xa2\x92\x08\x7c\x92\x92\x04\x7c\x48\xa9\x0f\x7c\x03\xa5\x01\xf0\x29\x4a\x67\xe0\xbb\x28\x5d\x80\xef\xaa\x74\x07\xbe\x87\xd2\x0b\xca\xc9\x56\x0a\x80\x7f\x48\x79\x1c\xd2\x27\x2b\xcf\x00\x5f\xa4\x14\x01\xff\xac\xea\x27\x54\x0d\xa8\x70\x5d\xb5\x8e\xda\x16\xf8\x5b\xd5\x5b\x81\x6f\xa7\xde\x06\x7c\x7b\xf5\x4e\xe0\x3b\xab\x3d\x81\xbf\x4b\xed\x0d\xfc\x3d\x1a\xb4\x51\x3b\xaf\x5d\x26\x92\xf6\x83\x33\x81\x50\x67\xa2\x33\x91\x30\x67\x92\x33\x0d\xf8\x86\xce\xc6\xc0\xa7\x3b\x27\x01\xff\xb8\xf3\x71\xe0\x27\x3b\x8b\x80\x7f\xd6\xf9\x7b\x22\x39\xe7\x39\xe7\x41\xca\x0b\xce\x05\x90\xf2\x92\x73\x21\xf0\x7f\x70\xae\x03\x7e\xbd\x73\x03\xf0\x7f\x76\x7e\x02\xfc\x1e\xe7\x1e\xe0\xf7\x06\x5e\x23\x34\xb0\x2a\xb0\x91\xb0\xc0\xdb\x81\xb7\x89\x14\xd8\x14\xd8\x04\xfc\x3b\x81\x63\x90\xfe\x75\xe0\x6b\xe0\x8b\xf5\xc1\x84\xea\x43\xf4\x21\x44\xd2\x73\xf5\x5c\xe0\x87\xea\x43\x81\x1f\xa6\x8f\x20\x4c\x1f\xa9\x8f\x84\x94\x3c\x7d\x2c\xf0\x8f\xe8\xc7\x81\x3f\xa1\x9f\x01\xbe\xd4\x88\x25\xd4\x88\x33\x42\x44\x32\xea\x1a\x85\xc0\x3f\x6c\x4c\x00\x7e\xa2\xb1\x0f\xf8\xcf\x8d\xcf\x81\xdf\x1f\x1c\x00\x5a\x22\xa3\x76\x70\xf2\x82\x6e\x44\xb4\x82\x81\x3e\x7c\x0e\xb8\x9f\xed\x07\x89\xff\x9d\xfd\x9d\xc8\xec\x00\x68\x05\x03\x7d\xf8\x37\xe0\x49\xd0\x04\x8a\x9a\xc0\x40\x13\xce\x03\x7f\x81\x5d\x04\xfe\x12\xfb\x01\xf8\x32\xd0\x0d\x06\x5a\xc1\x40\xee\xf0\x01\x5e\x06\x0d\xa1\xa8\x93\x0e\x7a\x90\xf5\x23\x7a\x66\x87\xae\xd9\x64\x7c\x4e\x41\xce\x40\x32\x2d\xa7\x60\x54\x3e\x59\x3e\xb0\x20\x67\x38\x59\x3b\x28\x27\xff\x21\xb2\x65\xd0\xb0\x21\x05\x64\xe7\xa0\x47\x0b\xf2\xc8\xfe\xa1\x43\x46\x17\x90\xd2\xa1\x05\x43\x46\x52\x32\x2c\x27\x7f\x38\xf5\x0e\x1b\x32\xb0\x80\xd6\x19\x99\x93\x9f\x43\x1b\xe5\xe5\x8c\x0e\xd1\x96\x79\x39\x85\xf9\xb4\xc3\xa8\x9c\xc2\x61\x74\x5a\xfe\x48\x48\x99\x3d\x7a
func assetsDejavusansTtfBytes() ([]byte, error) {
return bindataRead(
_assetsDejavusansTtf,
2015-05-25 12:11:55 +00:00
"assets/DejaVuSans.ttf",
)
}
2016-06-28 21:56:22 +00:00
func assetsDejavusansTtf() (*asset, error) {
bytes, err := assetsDejavusansTtfBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "assets/DejaVuSans.ttf", size: 756072, mode: os.FileMode(420), modTime: time.Unix(1432551573, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _assetsBadgetemplateTpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x94\x54\x5f\x6f\xda\x30\x10\x7f\xef\xa7\x38\x5d\x35\x69\x95\x80\x38\x30\x5e\xa6\x18\x69\xda\xa4\xee\x65\x4f\x9b\xba\x67\x87\xd8\x89\x37\xe3\x20\xdb\x25\x69\xab\x7e\xf7\xd9\x4e\x5a\x82\x42\xd7\x60\x1e\x38\x9b\xbb\xdf\x9f\xbb\x13\x99\x3d\x94\xd0\xee\x94\xb6\x14\x2b\xe7\xf6\x9f\x93\xa4\x69\x9a\x45\xb3\x5a\xd4\xa6\x4c\x96\x84\x90\xc4\x67\x20\x34\xb2\x70\x15\xc5\xa7\x27\x58\xfc\x0e\x21\x3c\x3f\x23\x54\x5c\x96\x95\xa3\xb8\x24\xb8\xb9\x02\x80\x4c\x49\xcd\x99\xb9\x35\xac\x90\x5c\x3b\x90\x05\xc5\x1c\xa1\x5d\x52\x24\x08\x0f\xfe\x2b\x25\xe4\x43\x97\x1b\xd2\xad\xab\xf7\x50\x0b\x61\xb9\x8b\x19\xe1\x3e\xdf\xd6\xaa\x36\x14\xaf\xf3\x3c\xef\x5f\xea\x3d\xdb\x4a\xf7\x40\x71\x91\x22\x24\xe7\xab\xfd\x2f\xe3\xf3\x56\x75\x96\x9c\x0a\xed\x1e\x77\xcc\xfe\x8d\x92\xd9\x51\xa1\xe1\x5b\xf7\xae\x77\x30\x2d\xc5\x15\x82\x90\x4a\x79\xe1\x42\x88\x23\x51\x00\xed\xc2\x12\x42\x4c\xf1\xde\xa8\x8f\xd7\xec\xe6\xc8\xb1\x67\x1e\xb2\xaf\x5d\xaf\xd7\xa7\x46\xbc\x9c\x1f\x64\x64\x8c\x40\x15\xd4\xfc\x92\x4e\xf1\x17\x49\x00\x87\x25\x81\xef\xe3\xe4\xc7\x61\xd3\x86\x64\x01\xe2\x6b\xe8\x76\x34\xd4\x93\x8d\x71\x3d\xe8\xd0\x7a\x8f\x1a\xc9\xc6\xc9\x6f\x91\x45\xd7\xf9\x0d\x4e\x74\x76\x8e\xec\x3f\xce\xb2\xa4\x7c\x69\xf2\x70\x08\x8e\xb7\x6e\xce\xf4\xb6\x0a\x0b\xb5\x93\x45\xa1\xb8\x9f\x52\xad\xdd\x5c\xb0\x9d\x54\x7e\x27\xbe\xf1\x3f\xec\xee\x1e\x7e\x32\x6d\x67\x77\xdc\x14\x4c\xb3\xd9\x2d\xd7\xfc\xc0\x66\xd6\xbf\xcd\x2d\x37\x52\xf4\x35\x56\x3e\x72\xbf\x68\xe9\x71\x72\x01\x1f\xda\x6e\x33\x62\x1b\xbe\x44\xae\xd8\x4e\x0f\x9e\xae\x5f\x77\x82\xa4\xe1\xd3\x5d\x07\x1b\xb9\xc2\xcd\x6b\xad\xaf\xca\x92\x80\x38\x19\xfe\xd3\xb9\x9d\x3f\x3d\x93\xe1\x7d\x3c\x40\xbf\x4c\x7d\xc0\xb9\x18\x7d\xb2\xf8\x11\x7a\x1c\x76\x16\xfe\x96\x36\x57\xff\x02\x00\x00\xff\xff\xde\xc7\x45\x2c\xbf\x04\x00\x00")
func assetsBadgetemplateTplBytes() ([]byte, error) {
return bindataRead(
_assetsBadgetemplateTpl,
"assets/badgeTemplate.tpl",
)
}
func assetsBadgetemplateTpl() (*asset, error) {
bytes, err := assetsBadgetemplateTplBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "assets/badgeTemplate.tpl", size: 1215, mode: os.FileMode(420), modTime: time.Unix(1432562639, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
2016-06-28 22:04:04 +00:00
var _assetsDemopageTplHtml = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xb4\x58\x6d\x93\xdb\xb6\x11\xfe\x9e\x5f\xb1\xa1\x27\x89\xcf\xc3\x77\x91\x12\xa5\xa3\x34\xb9\x28\x6e\xea\xd6\x76\x53\xc7\x99\xbe\x78\xfc\x01\x22\x21\x09\x67\x92\x90\x09\xe8\x5e\x72\xd5\x7f\xef\x03\x50\xd2\x51\x97\x73\x93\xba\xd3\xc9\xc8\x59\x60\x17\xbb\x8b\xdd\x67\x77\xc1\xcb\xbf\xfc\xfe\x2f\xf3\xb7\xff\xf8\xf1\x39\xad\x75\x5d\xcd\xbe\xc8\xcd\xff\xa8\x62\xcd\x6a\xea\xf0\xc6\x99\x7d\x41\x94\xaf\x39\x2b\x0d\x01\xb2\xe6\x9a\x51\xb1\x66\xad\xe2\x7a\xea\x6c\xf5\xd2\xcb\x9c\x3e\x6b\xad\xf5\xc6\xe3\x1f\xb7\xe2\x6a\xea\xfc\xdd\xfb\xf9\xc2\x9b\xcb\x7a\xc3\xb4\x58\x54\xdc\xa1\x42\x36\x9a\x37\x38\xf7\xe2\xf9\x94\x97\x2b\x7e\x72\xb2\x61\x35\x9f\x3a\x57\x82\x5f\x6f\x64\xab\x7b\xc2\xd7\xa2\xd4\xeb\x69\xc9\xaf\x44\xc1\x3d\xbb\x70\x49\x34\x42\x0b\x56\x79\xaa\x60\x15\x9f\x46\x07\x45\x5f\x7a\x1e\xbd\x5d\x73\x62\x0b\x79\xc5\x69\x40\x56\xb1\x66\x2b\x45\xcf\xea\xad\xd2\xcf\xa0\xb4\xe6\xb4\x14\xad\xd2\x50\x41\x1a\xa2\xe6\x6e\xe7\xc4\x9a\x5b\x92\x58\xb6\x76\x7d\xb0\x4d\xe6\x50\x77\xe6\x19\x5b\x6a\xde\x3e\x33\x47\x14\xef\x54\x7a\xde\xde\xaa\x16\xba\xe2\xb3\x05\xc3\x8d\xbc\x15\x6f\xe8\x7b\x5e\xcb\x3c\xe8\x76\xbf\xb8\x77\xec\x3b\x29\xb5\xd2\x2d\xdb\xdc\x9f\xac\x44\xf3\x81\xd6\x2d\x5f\x4e\x9d\x20\x28\xca\xe6\x52\xf9\x45\x25\xb7\xe5\xb2\x62\x2d\xf7\x61\x38\x60\x97\xec\x26\xa8\xc4\x42\x05\xfa\x5a\x68\xb8\xe0\x2d\x0e\x6a\x82\x81\x3f\xf0\xd3\xa0\x50\x2a\x38\xee\xf9\xb5\x68\x7c\xec\x38\xd4\xf2\x6a\xea\x28\x7d\x5b\x71\xb5\xe6\x5c\x3b\x8f\x59\xb4\xc7\xae\x99\x2e\xd6\xd6\x16\xac\xea\xea\xf6\x73\x95\xfd\x86\xfb\x4b\x84\xd4\x63\xd7\x5c\x21\x9a\x41\xe2\x0f\xfd\x81\xf5\xbc\xbf\xfd\x9f\xec\x75\x06\xed\x56\x67\x9c\xc8\x5f\x54\xb2\xf8\x40\x77\xfb\x25\xd1\x82\x15\x1f\x56\xad\xdc\x36\xa5\x57\xc8\x4a\xb6\x13\x7a\xb2\x1c\x9b\xff\xce\x8f\x22\x35\x6b\x57\xa2\x41\x0c\xb5\x96\xf5\x84\x06\xe1\xe6\xe6\x57\x4c\x2d\x37\x0f\x39\x1b\x56\x96\xa2\x59\x75\xdb\x14\xde\x33\x34\xbf\x81\xfb\x95\x58\x35\x13\x2a\x80\x18\xde\x1e\x78\xbb\x83\x97\x4b\x84\xb3\x91\x9a\xf7\x1c\xb5\x97\x56\xe2\x17\x3e\xa1\xd0\x1f\xf3\xfa\x57\x67\x5a\x5e\xf6\xc4\x0f\x97\x29\x46\x71\x9a\xf0\x87\xc2\xeb\xa8\x27\xfa\xe0\x7e\x71\xef\x16\x9d\x7c\x1e\xec\x63\x78\x8f\xcb\x3f\xbe\x7d\xf5\x32\x25\xb5\x16\x35\xca\xa0\xa4\x37\x5c\x6d\x64\x53\xfa\x97\x0a\x7e\xb6\xf4\xe2\x79\x46\x6a\xbb\x31\x35\x49\x72\xb9\x17\xe6\x15\xaf\x71\x5b\x65\x0f\xd4\xbc\x14\x8c\x3e\x6e\x79\x2b\x78\xaf\x2a\x8c\xea\xbf\x5d\xbc\x79\xfd\xe2\xf5\x0f\x93\xbe\xd2\x52\x72\xd5\x7c\xa3\xe9\x5a\xb6\x1f\x48\x2c\xe9\x56\x6e\xc9\x54\xbd\xad\xc6\x0d\x5b\x71\xac\x18\x6a\xb4\xe2\x93\x20\x38\x51\xf7\x0e\xd2\x95\x86\x47\x34\x7e\x7f\x00\x41\xae\x8a\x56\x6c\x34\xa9\xb6\x98\x3a\xa6\xf9\x28\x9c\x92\x4a\xf9\x35\xbb\x01\x22\x2d\x08\x4d\x47\x4b\x71\xbf\x2b\x54\xcc\xc8\x8f\xef\xd7\x16\x70\x97\xca\x99\x21\x2a\x56\xcd\x7f\xa3\xb5\xed\xae\x14\x44\x7e\x02\x9d\xfb\xd5\x27\x34\xe6\x5f\xbe\xe3\x4d\x29\x96\xef\xbb\xeb\xe4\xc1\xa1\xa3\xe6\x0b\x59\xde\xee\x65\x4a\x71\x45\x45\xc5\x94\x9a\x3a\xa6\xff\x30\xd1\xf0\xf6\x80\xfc\x53\x76\x2b\xaf\x9d\xd9\x31\xe7\xa7\x07\x2b\xaf\x2e\xbd\x8c\xf6\x84\x5c\x2e\xd1\xa8\xbd\x98\x6c\xad\xf4\x0e\x99\xae\x1e\xcd\xf2\x42\x96\xbd\xce\x95\x07\x76\xbd\x6f\x60\xe0\xf7\xc5\x37\xfd\x15\xd9\x36\x8b\xc6\xbe\x36\x20\xa9\x19\xa0\xb0\xf7\x59\xdd\x83\x03\x1d\xb6\x33\xf0\x75\xa5\xcf\x31\x50\x2a\xfe\xf5\x4a\x9f\x1f\x8c\x18\xe8\x74\xec\x77\xea\xe3\x16\x0d\xe3\xfd\x81\xb3\x68\x51\xc8\x5c\x2b\x9f\x2e\xaa\xea\x44\x9d\x55\x72\xe4\x13\x0e\x01\xf1\x4d\xc9\x1a\x2d\xdb\x5b\xba\x5e\x03\x34\x80\x91\x44\x87\x86\x70\xa7\xf5\x54\x5a\x6e\xb4\x90\x0d\xab\x7c\x9a\x9b\xa2\x52\xd4\x70\x94\x9a\x96\xb4\xe0\xa4\x36\xbc\x10\x4b\x81\x35\x53\x98\x1d\xc0\xfe\xd0\x4e\x3a\x56\x68\x3b\x17\x6e\xc8\xb8\xa7\xe8\xa9\x29\x0b\x7e\xc3\xea\x0d\xac\x75\x37\x48\x8a\xe8\xe0\x3c\x78\xdd\x1e\x0f\xd3\x32\x49\xf6\xdb\x67\x3e\xbd\x45\xab\xb0\xe6\xd4\xde\xde\xcf\x6f\x5e\x12\x6f\x0c\xbb\xf4\xfb\x81\x0e\x7a\x91\xce\x03\x24\xf7\x88\x4a\xbb\xe8\x2a\xcb\x0f\x00\x02\x5b\x1d\x9f\x83\x8f\x28\x3e\x85\x82\x66\x98\xcf\x07\x99\x6e\x61\xff\xf5\x30\x07\xc4\x86\x97\xce\x69\xee\x73\xdd\xce\x72\xbd\x9e\xfd\xc4\x5b\x33\x94\x31\xeb\xd6\x76\xfd\xbc\x0b\x
2016-06-28 21:56:22 +00:00
func assetsDemopageTplHtmlBytes() ([]byte, error) {
return bindataRead(
_assetsDemopageTplHtml,
"assets/demoPage.tpl.html",
)
}
func assetsDemopageTplHtml() (*asset, error) {
bytes, err := assetsDemopageTplHtmlBytes()
if err != nil {
return nil, err
}
2016-06-28 22:04:04 +00:00
info := bindataFileInfo{name: "assets/demoPage.tpl.html", size: 4581, mode: os.FileMode(420), modTime: time.Unix(1467151434, 0)}
2016-06-28 21:56:22 +00:00
a := &asset{bytes: bytes, info: info}
return a, nil
}
2015-05-25 12:11:55 +00:00
// 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 {
2016-06-28 21:56:22 +00:00
a, err := f()
if err != nil {
return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
}
return a.bytes, nil
2015-05-25 12:11:55 +00:00
}
return nil, fmt.Errorf("Asset %s not found", name)
}
2016-06-28 21:56:22 +00:00
// 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)
}
2015-05-25 12:11:55 +00:00
// 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.
2016-06-28 21:56:22 +00:00
var _bindata = map[string]func() (*asset, error){
"assets/DejaVuSans.ttf": assetsDejavusansTtf,
"assets/badgeTemplate.tpl": assetsBadgetemplateTpl,
"assets/demoPage.tpl.html": assetsDemopageTplHtml,
2015-05-25 12:11:55 +00:00
}
2016-06-28 21:56:22 +00:00
2015-05-25 12:11:55 +00: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))
2016-06-28 21:56:22 +00:00
for childName := range node.Children {
rv = append(rv, childName)
2015-05-25 12:11:55 +00:00
}
return rv, nil
}
2016-06-28 21:56:22 +00:00
type bintree struct {
Func func() (*asset, error)
Children map[string]*bintree
2015-05-25 12:11:55 +00:00
}
2016-06-28 21:56:22 +00:00
var _bintree = &bintree{nil, map[string]*bintree{
"assets": &bintree{nil, map[string]*bintree{
"DejaVuSans.ttf": &bintree{assetsDejavusansTtf, map[string]*bintree{}},
"badgeTemplate.tpl": &bintree{assetsBadgetemplateTpl, map[string]*bintree{}},
"demoPage.tpl.html": &bintree{assetsDemopageTplHtml, map[string]*bintree{}},
2015-05-25 12:11:55 +00:00
}},
}}
2016-06-28 21:56:22 +00: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, "/")...)...)
}