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