You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
218 lines
74 KiB
Go
218 lines
74 KiB
Go
5 years ago
|
// Code generated for package main by go-bindata DO NOT EDIT. (@generated)
|
||
|
// sources:
|
||
|
// tailscale.png
|
||
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"io/ioutil"
|
||
|
"os"
|
||
|
"path/filepath"
|
||
|
"strings"
|
||
|
"time"
|
||
|
)
|
||
|
type asset struct {
|
||
|
bytes []byte
|
||
|
info os.FileInfo
|
||
|
}
|
||
|
|
||
|
type bindataFileInfo struct {
|
||
|
name string
|
||
|
size int64
|
||
|
mode os.FileMode
|
||
|
modTime time.Time
|
||
|
}
|
||
|
|
||
|
// Name return file name
|
||
|
func (fi bindataFileInfo) Name() string {
|
||
|
return fi.name
|
||
|
}
|
||
|
|
||
|
// Size return file size
|
||
|
func (fi bindataFileInfo) Size() int64 {
|
||
|
return fi.size
|
||
|
}
|
||
|
|
||
|
// Mode return file mode
|
||
|
func (fi bindataFileInfo) Mode() os.FileMode {
|
||
|
return fi.mode
|
||
|
}
|
||
|
|
||
|
// Mode return file modify time
|
||
|
func (fi bindataFileInfo) ModTime() time.Time {
|
||
|
return fi.modTime
|
||
|
}
|
||
|
|
||
|
// IsDir return file whether a directory
|
||
|
func (fi bindataFileInfo) IsDir() bool {
|
||
|
return fi.mode&os.ModeDir != 0
|
||
|
}
|
||
|
|
||
|
// Sys return file is sys mode
|
||
|
func (fi bindataFileInfo) Sys() interface{} {
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
var _tailscalePng = []byte("\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x04\x00\x00\x00\x00\xca\b\x06\x00\x00\x00;!2B\x00\x00\x00\tpHYs\x00\x00\x9e\x1b\x00\x00\x9e\x1b\x01b8\xb7\xfd\x00\x00\x00\x19tEXtSoftware\x00www.inkscape.org\x9b\xee<\x1a\x00\x00 \x00IDATx\x9c\xec\xddw\x9c$e\x9d?\xf0\u03f7:UU\xcf\xec.\xbb \"(9\x83\bJ\x92\f\x82\xa0\xe8OP\f\x88\x8az\x9e'\x86\xd3\u00c0\xf1\xe4\x0e\xef\xf4\x8c\u725e\t\u00ddpg\x0e\x04A\x11AP\x82\x9c\x04%\a1\x00\xb2\xbb3]\xa1\xab\xba\xeb\xf3\xfbc\x06X\x96\x9deB\xf7<\xd5\u075f\xf7\xeb5/v{\xba\xab>\xc3\xf6t=\u03f7\x9e`\x10\x11YK\x9aF\xc7z\xc4\xf7\\\xe7\x98\x19/\xa9\ac\a\xb9N!\"\"\"\"2H<\xd7\x01DDDDDDD\xa4\xffT\x00\x10\x11\x11\x11\x11\x11\x11\x19\x01U\xd7\x01DD\u028ed\xc3u\x86\x19\xe4fV\xb8\x0e!\"\"\xe2\x12\xc9\n\xca\u066f\xa1\x99e\xaeC\x88\xac\xa9\x8c\xbf(\"\"\xa5\xc1(\xda4O\xe3?\xba\u03b1.\xf4p\x1c\x80\xef\xba\xce!\"\"\xe2R\xdeN>\f\xf2\xef]\xe7X\x87\xdb\x00l\xed:\x84\u021a4\x05@DDDDDDd\x04\xf4}\x04\x00\xc9J\xa7\x1d\x1d\xdc\xef\xf3\xccG\xb5k7X\xb3\xf9'\xd79DDDDDDD\xfam1\xa6\x004H\xbbp\x11\xce3g\xb9\xc7W\x008\xdbu\x0e\x11\x11\x11\x11\x11\x11\x91~\xd3\x14\x00\x11\x11\x11\x11\x11\x11\x91\x11\xa0\x02\x80\x88\x88\x88\x88\x88\x88\xc8\bP\x01@DDDDDDd\x04\xa8\x00 \"\"\"\"\"\"2\x02T\x00\x10\x11\x11\x11\x11\x11\x11\x19\x01*\x00\x88\x88\x88\x88\x88\x88\x88\x8c\x00\x15\x00DDDDDDDF\x80\n\x00\"\"\"\"\"\"\"#@\x05\x00\x11\x11\x11\x11\x11\x11\x91\x11\xa0\x02\x80\x88\x88\x88\x88\x88\x88\xc8\bP\x01@DDDDDDd\x04\xa8\x00 \"\"\"\"\"\"2\x02T\x00\x10\x11\x11\x11\x11\x11\x11\x19\x01*\x00\x88\x88\x88\x88\x88\x88\x88\x8c\x00\x15\x00DDDDDDDF\x80\n\x00\"\"\"\"\"\"\"#@\x05\x00\x11\x11\x11\x11\x11\x11\x91\x11\xa0\x02\x80\x88\x88\x88\x88\x88\x88\xc8\bP\x01@DDDDDDd\x04\xa8\x00 \"\"\"\"\"\"2\x02T\x00\x10\x11\x11\x11\x11\x11\x11\x19\x01*\x00\x88\x88\x88\x88\x88\x88\x88\x8c\x00\x15\x00DDDDDDDF\x80\n\x00\"\"\"\"\"\"\"#@\x05\x00\x11\x11\x11\x11\x11\x11\x91\x11\xa0\x02\x80\x88\x88\x88\x88\x88\x88\xc8\bP\x01@DDDDDDd\x04T]\a\x10\x91\xf21+n%*\xff\xe2:\xc7L\f\xb8\xcdu\x06\x11\x11\x11\x11\x91A\xa3\x02\x80\x88<F\xa31~\x13\x80\xd3\\\xe7\x10\x11\x11\x11\x11\x91\xde\xd1\x14\x00\x11\x11\x11\x11\x11\x11\x91\x11\xa0\x02\x80\x88\x88\x88\x88\x88\x88\xc8\bP\x01@DDDDDDd\x04\xa8\x00 \"\"\"\"\"\"2\x02T\x00\x10\x11\x11\x11\x11\x11\x11\x19\x01*\x00\x88\x88\x88\x88\x88\x88\x88\x8c\x00\x15\x00DDDDDDDF\x80\n\x00\"\"\"\"\"\"\"#@\x05\x00\x11\x11\x11\x11\x11\x11\x91\x11\xa0\x02\x80\x88\x88\x88\x88\x88\x88\xc8\bP\x01@DDDDDDd\x04\xa8\x00 \"\"\"\"\"\"2\x02T\x00\x10\x11\x11\x11\x11\x11\x11\x19\x01*\x00\x88\x88\x88\x88\x88\x88\x88\x8c\x80\xaa\xeb\x00\"kc\xab\xb5I\xeeyO&\xb0\x99y\xdc\u0608\xe54[\x0er\xb9\x196 16\xfd\xcc\x06\xcc\xc2G^\x88\x0e\x80I\x000\xc3J\x00 1\t\xe3j+\xf0G\x1a\xfeb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\xea@\x8f\xfd\x8b=\xf4g\xb3\x87?\u007f\x8c\x00< \xf7\xbc\x87>;~\x0f\xf2&\x83]_\x14\xb8\xb1\xf0\xbck\x83 \xb8\xab_?\xaf\xf4\x17I?O\x92\xa9\xf7\x92qG\xd2v6`\x87<\x8d7\xab\x00\xdeC\xef\x8cG\xbd\xaf\x1e\xfdN\x9a\xf1zd\xf6\xc85i\xea\xba\u01a9\xc7`\xf0\xd8E\x9e\u019d,\x89\xee$p\xab\x11\x
|
||
|
|
||
|
func tailscalePngBytes() ([]byte, error) {
|
||
|
return _tailscalePng, nil
|
||
|
}
|
||
|
|
||
|
func tailscalePng() (*asset, error) {
|
||
|
bytes, err := tailscalePngBytes()
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
|
||
|
info := bindataFileInfo{name: "tailscale.png", size: 24866, mode: os.FileMode(436), modTime: time.Unix(1589933683, 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){
|
||
|
"tailscale.png": tailscalePng,
|
||
|
}
|
||
|
|
||
|
// 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{
|
||
|
"tailscale.png": &bintree{tailscalePng, 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, "/")...)...)
|
||
|
}
|