1
0
mirror of https://github.com/Luzifer/badge-gen.git synced 2024-09-19 23:32:56 +00:00
badge-gen/bindata.go

284 lines
1.5 MiB
Go
Raw 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:22:48 +00:00
var _assetsDemopageTplHtml = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xb4\x58\x6d\x73\xdb\x36\x12\xfe\xde\x5f\xb1\x61\xa6\x6d\x9c\x11\x5f\x45\x4a\x94\x4c\x69\xea\xaa\xb9\x5e\xee\x92\x5c\x2f\x4d\xef\x2d\x93\x0f\x10\x09\x49\x70\x48\x42\x21\x20\xd9\xae\x4f\xff\xfd\x1e\x80\x92\x4c\x39\xce\xb5\xe7\x99\x9b\x8e\xd2\x05\x76\xb1\xbb\xd8\x7d\x76\x17\x74\xf6\xe4\x87\xbf\xcc\xde\xfd\xf3\xa7\x17\xb4\xd2\x55\x39\xfd\x2a\x33\xff\xa3\x92\xd5\xcb\x89\xc3\x6b\x67\xfa\x15\x51\xb6\xe2\xac\x30\x04\xc8\x8a\x6b\x46\xf9\x8a\x35\x8a\xeb\x89\xb3\xd1\x0b\x37\x75\xba\xac\x95\xd6\x6b\x97\x7f\xda\x88\xed\xc4\xf9\x87\xfb\xcb\x85\x3b\x93\xd5\x9a\x69\x31\x2f\xb9\x43\xb9\xac\x35\xaf\x71\xee\xe5\x8b\x09\x2f\x96\xfc\xe4\x64\xcd\x2a\x3e\x71\xb6\x82\x5f\xad\x65\xa3\x3b\xc2\x57\xa2\xd0\xab\x49\xc1\xb7\x22\xe7\xae\x5d\xf4\x48\xd4\x42\x0b\x56\xba\x2a\x67\x25\x9f\x84\x07\x45\x4f\x5c\x97\xde\xad\x38\xb1\xb9\xdc\x72\xea\x93\x55\xac\xd9\x52\xd1\xf3\x6a\xa3\xf4\x73\x28\xad\x38\x2d\x44\xa3\x34\x54\x90\x86\xa8\xb9\xdb\x39\xb1\xfa\x86\x24\x96\x8d\x5d\x1f\x6c\x93\x39\xd4\x9e\x79\xce\x16\x9a\x37\xcf\xcd\x11\xc5\x5b\x95\xae\xbb\xb7\xaa\x85\x2e\xf9\x74\xce\x70\x23\x77\xc9\x6b\xfa\x81\x57\x32\xf3\xdb\xdd\xaf\xee\x1c\xfb\x5e\x4a\xad\x74\xc3\xd6\x77\x27\x4b\x51\x7f\xa4\x55\xc3\x17\x13\xc7\xf7\xf3\xa2\xbe\x54\x5e\x5e\xca\x4d\xb1\x28\x59\xc3\x3d\x18\xf6\xd9\x25\xbb\xf6\x4b\x31\x57\xbe\xbe\x12\x1a\x2e\xb8\xf3\x83\x1a\xbf\xef\xf5\xbd\xc4\xcf\x95\xf2\x8f\x7b\x5e\x25\x6a\x0f\x3b\x0e\x35\xbc\x9c\x38\x4a\xdf\x94\x5c\xad\x38\xd7\xce\x43\x16\xed\xb1\x2b\xa6\xf3\x95\xb5\x05\xab\xba\xbc\x79\xac\xb2\xdf\x70\x7f\x81\x90\xba\xec\x8a\x2b\x44\xd3\x8f\xbd\x81\xd7\xb7\x9e\x77\xb7\xff\x9b\xbd\xd6\xa0\xdd\x6a\x8d\x13\x79\xf3\x52\xe6\x1f\xe9\x76\xbf\x24\x9a\xb3\xfc\xe3\xb2\x91\x9b\xba\x70\x73\x59\xca\x66\x4c\x4f\x17\x23\xf3\xdf\xf9\x51\xa4\x62\xcd\x52\xd4\x88\xa1\xd6\xb2\x1a\x53\x3f\x58\x5f\x7f\xc6\xd4\x72\x7d\x9f\xb3\x66\x45\x21\xea\x65\xbb\x4d\xc1\x1d\x43\xf3\x6b\xb8\x5f\x8a\x65\x3d\xa6\x1c\x88\xe1\xcd\x81\xb7\x3b\x78\xb9\x40\x38\x6b\xa9\x79\xc7\x51\x7b\x69\x25\x7e\xe5\x63\x0a\xbc\x11\xaf\x3e\x3b\xd3\xf0\xa2\x23\x7e\xb8\x4c\x3e\x8c\x92\x98\xdf\x17\x5e\x85\x1d\xd1\x7b\xf7\x8b\x3a\xb7\x68\xe5\x33\x7f\x1f\xc3\x3b\x5c\xfe\xf1\xdd\xeb\x57\x09\xa9\x95\xa8\x50\x06\x05\xbd\xe5\x6a\x2d\xeb\xc2\xbb\x54\xf0\xb3\xa1\x97\x2f\x52\x52\x9b\xb5\xa9\x49\x92\x8b\xbd\x30\x2f\x79\x85\xdb\x2a\x7b\xa0\xe2\x85\x60\xf4\x69\xc3\x1b\xc1\x3b\x55\x61\x54\xff\xfd\xe2\xed\x9b\x97\x6f\x7e\x1c\x77\x95\x16\x92\xab\xfa\x5b\x4d\x57\xb2\xf9\x48\x62\x41\x37\x72\x43\xa6\xea\x6d\x35\xae\xd9\x92\x63\xc5\x50\xa3\x25\x1f\xfb\xfe\x89\xba\xf7\x90\x2e\x35\x3c\xa2\xd1\x87\x03\x08\x32\x95\x37\x62\xad\x49\x35\xf9\xc4\x31\xcd\x47\xe1\x94\x54\xca\xab\xd8\x35\x10\x69\x41\x68\x3a\x5a\x82\xfb\x6d\x51\x31\x43\x2f\xba\x5b\x5b\xc0\x5d\x2a\x67\x8a\xa8\x58\x35\xff\x8b\xd6\xa6\xbd\x92\x1f\x7a\x31\x74\xee\x57\x5f\xd0\x98\x3d\x79\xcf\xeb\x42\x2c\x3e\xb4\xd7\xc9\xfc\x43\x47\xcd\xe6\xb2\xb8\xd9\xcb\x14\x62\x4b\x79\xc9\x94\x9a\x38\xa6\xff\x30\x51\xf3\xe6\x80\xfc\x53\x76\x23\xaf\x9c\xe9\x31\xe7\xa7\x07\x4b\xb7\x2a\xdc\x94\xf6\x84\x5c\x2c\xd0\xa8\xdd\x88\x6c\xad\x74\x0e\x99\xae\x1e\x4e\xb3\x5c\x16\x9d\xce\x95\xf9\x76\xbd\x6f\x60\xe0\x77\xc5\xd7\xdd\x15\xd9\x36\x8b\xc6\xbe\x32\x20\xa9\x18\xa0\xb0\xf7\x59\xdd\x81\x03\x1d\xb6\x35\xf0\x4d\xa9\xcf\x31\x50\x4a\xfe\xcd\x52\x9f\x1f\x8c\x18\xe8\xb4\xec\xf7\xea\xd3\x06\x0d\xe3\xc3\x81\x33\x6f\x50\xc8\x5c\x2b\x8f\x2e\xca\xf2\x44\x9d\x55\x72\xe4\x13\x0e\x01\xf1\x75\xc1\x6a\x2d\x9b\x1b\xba\x5a\x01\x34\x80\x91\x44\x87\x86\x70\xab\xf5\x54\x5a\xae\xb5\x90\x35\x2b\x3d\x9a\x99\xa2\x52\x54\x73\x94\x9a\x96\x34\xe7\xa4\xd6\x3c\x17\x0b\x81\x35\x53\x98\x1d\xc0\xfe\xc0\x4e\x3a\x96\x6b\x3b\x17\xae\xc9\xb8\xa7\xe8\x99\x29\x0b\x7e\xcd\xaa\x35\xac\xb5\x37\x88\xf3\xf0\xe0\x3c\x78\xed\x1e\x0f\x92\x22\x8e\xf7\xdb\x67\x1e\xbd\x43\xab\xb0\xe6\xd4\xde\xde\x2f\x6f\x5f\x11\xaf\x0d\xbb\xf0\xba\x81\xf6\x3b\x91\xce\x7c\x24\xf7\x88\x4a\xbb\x68\x2b\xcb\xf3\x01\x02\x5b\x1d\x8f\xc1\x47\x18\x9d\x42\x41\x33\xcc\xe7\x83\x4c\xbb\xb0\xff\xba\x98\x03\x62\xcd\x0b\xe7\x34\xf7\x99\x6e\xa6\x99\x5e\x4d\x7f\xe6\x8d\x19\xca\x98\x75\x2b\xbb\x7e\xd1\x06\xe5\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:22:48 +00:00
info := bindataFileInfo{name: "assets/demoPage.tpl.html", size: 4660, mode: os.FileMode(420), modTime: time.Unix(1467152544, 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, "/")...)...)
}