// Code generated by go-bindata. // sources: // templates/index.tpl // templates/package.tpl // 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 } var _templatesIndexTpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xb2\x51\x74\xf1\x77\x0e\x89\x0c\x70\x55\xc8\x28\xc9\xcd\xb1\xe3\xb2\x81\x50\x9c\x36\x49\xf9\x29\x95\x40\x9a\xd3\xa6\x14\xc4\xe5\xe4\xac\xae\x56\x28\x4a\xcc\x4b\x4f\x55\x50\xc9\x4e\xad\xd4\x51\x50\x29\x4b\xcc\x29\x4d\x55\xb0\xb2\x55\xd0\x0b\x48\x4c\xce\x4e\x4c\x4f\x2d\x56\xa8\xad\x05\x29\xe4\xb4\xc9\xc9\xb4\x03\xaa\x06\xa9\x03\x0a\x29\xe8\x2a\x80\x38\x60\xe5\x7a\x41\xa9\x05\xf9\x40\x31\x1b\x7d\xa0\x12\xa8\xa1\xa9\x79\x29\x10\x8d\x36\xfa\x60\x9b\x6c\xf4\x21\x36\xdb\xe8\x43\x5c\x02\x08\x00\x00\xff\xff\xb2\xe2\x86\x15\xa1\x00\x00\x00") func templatesIndexTplBytes() ([]byte, error) { return bindataRead( _templatesIndexTpl, "templates/index.tpl", ) } func templatesIndexTpl() (*asset, error) { bytes, err := templatesIndexTplBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "templates/index.tpl", size: 161, mode: os.FileMode(420), modTime: time.Unix(1475274933, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _templatesPackageTpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x8c\x91\xb1\x4e\xc3\x30\x10\x86\x77\x9e\xe2\x08\x73\x6b\x66\x70\xba\x14\xc4\x52\x41\x55\xc1\xc0\x68\x92\xbf\x89\x25\xdb\x57\xec\x4b\x25\x14\xe5\xdd\x71\x9a\x4a\x05\x51\x04\x5e\x6c\x9f\xad\xef\xfb\x75\xa7\x2f\xef\x9e\x96\xcf\xaf\xeb\x7b\x6a\xc5\xbb\xc5\x85\x9e\x36\xca\x4b\xb7\x30\xf5\x74\x3c\x5c\x3d\xc4\x50\x30\x1e\x65\xd1\xf0\xcc\xfa\x1d\x47\x29\xa8\xe2\x20\x08\x52\x16\x7d\x4f\xf3\xa5\x09\x1c\x6c\x65\xdc\xcb\x66\x45\xc3\x40\x8d\x95\xcc\x95\x5d\xba\x51\x6a\x7c\xdf\x60\xc7\xb9\x5e\xfc\x4a\x4d\xdc\xc5\x0a\x7f\x50\xcf\x10\xcf\xd5\x94\x44\x40\x79\x93\x04\xb1\x57\xb5\x8d\xff\xfc\xa5\xfa\xad\x75\x18\xae\x56\xbd\xb3\x01\x3f\xc3\x8e\x90\x19\xde\x3b\xbb\x2f\x8b\x88\x6d\x44\x6a\xbf\x04\xbe\xbe\xa5\x2e\xba\x72\x34\x3c\x70\xcd\xd5\x94\xf9\x08\xd1\xea\xd4\x53\xfd\xc6\xf5\xc7\x89\xfd\xc8\xd2\xda\xd0\x90\x30\x25\x80\x5a\x44\xcc\x69\xed\x60\x12\x48\x67\x69\x36\x4d\xdd\xf8\x46\xf5\xbc\x07\x19\xc7\xa1\xd1\xca\x2c\xe6\x47\xc9\x44\xce\xb2\xc3\x2c\x3f\x03\x00\x00\xff\xff\x69\xc7\x6b\xa3\xe3\x01\x00\x00") func templatesPackageTplBytes() ([]byte, error) { return bindataRead( _templatesPackageTpl, "templates/package.tpl", ) } func templatesPackageTpl() (*asset, error) { bytes, err := templatesPackageTplBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "templates/package.tpl", size: 483, mode: os.FileMode(420), modTime: time.Unix(1475274933, 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){ "templates/index.tpl": templatesIndexTpl, "templates/package.tpl": templatesPackageTpl, } // 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{ "templates": &bintree{nil, map[string]*bintree{ "index.tpl": &bintree{templatesIndexTpl, map[string]*bintree{}}, "package.tpl": &bintree{templatesPackageTpl, 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, "/")...)...) }