1
0
Fork 0
mirror of https://github.com/Luzifer/go-holidays.git synced 2024-10-18 14:14:20 +00:00
go-holidays/cmd/holiday-api/assets.go

236 lines
17 KiB
Go
Raw Normal View History

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