// Package build Code generated by go-bindata. (@generated) DO NOT EDIT. // sources: // template/build.tmpl package build 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 } // 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 _templateBuildTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x5c\x8f\x41\x4b\x03\x31\x10\x85\xcf\x3b\xbf\xe2\x11\x2a\x28\xb4\xe9\xbd\xd0\x9b\x67\x11\x7a\x14\x91\x74\x3b\xbb\x0d\x36\xd9\x75\x93\x8a\x32\xcc\x7f\x97\x64\xd7\x1e\x7a\x0a\x33\x79\xf9\xbe\x3c\x11\x9c\xb8\xf3\x91\x61\x82\xf3\xd1\x40\x95\x46\xd7\x7e\xba\x9e\x51\x16\x44\x3e\x8c\xc3\x94\xf1\x48\x8d\x08\xc6\xc9\xc7\xdc\xc1\x3c\x7c\x19\xd8\xd7\x25\xa7\x4a\xd4\x98\xee\xd8\x6e\x39\x66\x43\x4f\x44\x22\x58\x1d\x5d\x62\xec\xf6\xa8\xe7\x7f\xb6\x44\xb7\x5b\x88\xc0\x1e\x7e\xc3\x71\xb8\x40\x15\x3e\x21\x9f\x19\xe3\xe5\xda\xfb\x88\x6e\x98\xc0\x3f\xc5\xe9\x63\x5f\x2f\xee\xbc\x33\x59\x15\xa9\x3d\x73\x70\x69\x7e\x11\x73\x6b\xe9\xdb\x4d\x77\xec\x3d\xde\xde\x39\x66\x7b\xa8\x59\xa9\x25\x26\x17\x7b\xc6\xea\x63\x8d\x55\x74\xa1\x7e\xd2\xbe\xb8\xc0\xa9\x34\x69\x1a\x91\xcd\xcd\x61\xcb\x70\x93\x27\x99\x31\xbb\xa2\xb3\xcf\xdc\xb9\xeb\x25\xcf\x2b\x35\x0b\x4c\x75\x5d\x25\x1c\x4f\xd8\xa8\x92\xd2\x32\xa8\xfe\x05\x00\x00\xff\xff\x80\xe4\x62\x1c\x6c\x01\x00\x00") func templateBuildTmplBytes() ([]byte, error) { return bindataRead( _templateBuildTmpl, "template/build.tmpl", ) } func templateBuildTmpl() (*asset, error) { bytes, err := templateBuildTmplBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "template/build.tmpl", size: 364, mode: os.FileMode(420), modTime: time.Unix(1554652414, 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){ "template/build.tmpl": templateBuildTmpl, } // 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{ "template": &bintree{nil, map[string]*bintree{ "build.tmpl": &bintree{templateBuildTmpl, 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, "/")...)...) }