1package bindata
2
3const tmplTypeBintree string = `
4type bintree struct {
5	Func     func() (*asset, error)
6	Children map[string]*bintree
7}
8
9var _bintree = &bintree`
10
11const tmplBinTreeValues string = `{Func: %s, Children: map[string]*bintree{`
12
13const tmplFuncAssetDir string = `
14//
15// AssetDir returns the file names below a certain
16// directory embedded in the file by go-bindata.
17// For example if you run go-bindata on data/... and data contains the
18// following hierarchy:
19//     data/
20//       foo.txt
21//       img/
22//         a.png
23//         b.png
24// then AssetDir("data") would return []string{"foo.txt", "img"}
25// AssetDir("data/img") would return []string{"a.png", "b.png"}
26// AssetDir("foo.txt") and AssetDir("notexist") would return an error
27// AssetDir("") will return []string{"data"}.
28//
29func AssetDir(name string) ([]string, error) {
30	node := _bintree
31	if len(name) != 0 {
32		cannonicalName := strings.Replace(name, "\\", "/", -1)
33		pathList := strings.Split(cannonicalName, "/")
34		for _, p := range pathList {
35			node = node.Children[p]
36			if node == nil {
37				return nil, &os.PathError{
38					Op: "open",
39					Path: name,
40					Err: os.ErrNotExist,
41				}
42			}
43		}
44	}
45	if node.Func != nil {
46		return nil, &os.PathError{
47			Op: "open",
48			Path: name,
49			Err: os.ErrNotExist,
50		}
51	}
52	rv := make([]string, 0, len(node.Children))
53	for childName := range node.Children {
54		rv = append(rv, childName)
55	}
56	return rv, nil
57}
58
59`
60
61const tmplFuncAsset string = `
62//
63// Asset loads and returns the asset for the given name.
64// It returns an error if the asset could not be found or
65// could not be loaded.
66//
67func Asset(name string) ([]byte, error) {
68	cannonicalName := strings.Replace(name, "\\", "/", -1)
69	if f, ok := _bindata[cannonicalName]; ok {
70		a, err := f()
71		if err != nil {
72			return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
73		}
74		return a.bytes, nil
75	}
76	return nil, &os.PathError{Op: "open", Path: name, Err: os.ErrNotExist}
77}
78
79//
80// MustAsset is like Asset but panics when Asset would return an error.
81// It simplifies safe initialization of global variables.
82// nolint: deadcode
83//
84func MustAsset(name string) []byte {
85	a, err := Asset(name)
86	if err != nil {
87		panic("asset: Asset(" + name + "): " + err.Error())
88	}
89
90	return a
91}
92
93//
94// AssetInfo loads and returns the asset info for the given name.
95// It returns an error if the asset could not be found or could not be loaded.
96//
97func AssetInfo(name string) (os.FileInfo, error) {
98	cannonicalName := strings.Replace(name, "\\", "/", -1)
99	if f, ok := _bindata[cannonicalName]; ok {
100		a, err := f()
101		if err != nil {
102			return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
103		}
104		return a.info, nil
105	}
106	return nil, &os.PathError{Op: "open", Path: name, Err: os.ErrNotExist}
107}
108
109//
110// AssetNames returns the names of the assets.
111// nolint: deadcode
112//
113func AssetNames() []string {
114	names := make([]string, 0, len(_bindata))
115	for name := range _bindata {
116		names = append(names, name)
117	}
118	return names
119}
120
121//
122// _bindata is a table, holding each asset generator, mapped to its name.
123//
124var _bindata = map[string]func() (*asset, error){
125`
126