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