forked from wjessop/build_ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bindata.go
276 lines (244 loc) · 13.1 KB
/
bindata.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
package main
import (
"bytes"
"compress/gzip"
"fmt"
"io"
"strings"
"os"
"time"
"io/ioutil"
"path"
"path/filepath"
)
func bindata_read(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)
gz.Close()
if err != nil {
return nil, fmt.Errorf("Read %q: %v", name, err)
}
return buf.Bytes(), nil
}
type asset struct {
bytes []byte
info os.FileInfo
}
type bindata_file_info struct {
name string
size int64
mode os.FileMode
modTime time.Time
}
func (fi bindata_file_info) Name() string {
return fi.name
}
func (fi bindata_file_info) Size() int64 {
return fi.size
}
func (fi bindata_file_info) Mode() os.FileMode {
return fi.mode
}
func (fi bindata_file_info) ModTime() time.Time {
return fi.modTime
}
func (fi bindata_file_info) IsDir() bool {
return false
}
func (fi bindata_file_info) Sys() interface{} {
return nil
}
var _data_dockerfile_centos_template = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x74\x52\x4d\x73\xd3\x3c\x10\xbe\xe7\x57\xec\xf8\xda\x57\xf5\xe1\x3d\xfb\xd0\x49\x08\xd3\x01\x12\xc6\x25\x70\xa0\x1c\x64\x6b\xed\x8a\xea\xc3\x23\xc9\xa1\x69\xc9\x7f\x67\xad\xc8\x4e\x5c\x4a\x66\x92\xec\x3e\xda\xaf\x67\xf7\x59\x97\xdb\x4f\xf0\xf2\x72\xbd\x92\x3e\x38\x7b\x3c\x2e\xca\xdd\x06\x0e\xbd\x86\xbe\x13\x3c\x20\xb0\xc3\x84\x48\xe3\x03\x57\x8a\x20\x68\xeb\x7a\xf8\xb2\xfa\xea\x0a\x34\x7f\x44\xe0\x7d\xb0\xd1\x78\x44\x67\x50\x31\x81\x7b\x54\xe0\x3a\xcd\xaa\x5e\x2a\x01\xf7\x0b\xa0\x4f\xab\x64\x55\xa7\x37\x32\x9b\x46\x26\xa7\x15\x95\x4e\xa6\xa9\x7b\xe7\xd1\x27\xef\x94\xe7\x90\x0b\x25\x0d\x26\xd0\x76\x68\xbc\x57\xe7\x42\x07\xae\x47\xef\x99\xdc\x79\x6e\x5f\x1d\xe2\xcf\x38\x13\x99\x2d\x6a\x0f\xd4\x47\x41\xe0\x2e\xf2\xfb\x9e\xe5\xbd\x77\x79\x25\x4d\x4e\x8f\xd9\x7f\x90\x25\xb6\x83\xd9\x74\x11\x61\x8c\x9e\x85\x74\xc5\x18\x7a\x02\x8d\x65\x4e\xd8\xfa\xec\xc8\xec\x47\xac\x19\x1b\x0c\xab\xb5\xbf\x8c\xb2\x5c\xec\x9c\x3a\x1e\x7f\x53\x47\xb0\x4f\xcf\x4b\xc8\x83\xee\x16\xdf\xb6\xe5\x87\xd5\x6d\x19\x9d\x3c\x4e\x49\x09\x25\xfd\x7f\x45\xe7\xa5\x35\xe9\x20\xcb\xf5\xc7\x9b\xf7\x77\x45\xc6\x34\x77\xf5\x43\x61\x78\x90\x7b\xba\xcd\xf6\xff\x0c\xae\xf3\xda\x9a\x46\xb6\xbd\xc3\xc8\x98\xb1\xce\x61\x23\x9f\x8a\xdc\x76\x21\x96\x7c\x5d\x31\x85\xa1\xe1\x95\x42\xe6\x1f\xb8\x43\x91\x30\x21\x7d\x04\x13\x79\x46\xbc\xe6\xd1\x03\x0f\xe6\x50\xc5\x01\xe2\x68\xf1\xea\xec\x27\x35\xd9\xf4\x7a\xf9\x79\x47\xf5\x47\xa1\xac\xde\xdd\x7d\x21\x72\x45\x24\x47\x4b\x5c\x9c\xe9\xc6\x54\x82\xd2\x91\x98\x07\x5a\xec\xe8\x84\x41\x38\xa3\x63\xe0\xcd\xb5\x8c\xcf\x7c\xd8\xf0\x0d\x2d\xe5\x0c\xed\xe1\x1f\xc1\x04\xdf\x06\x74\x34\x7b\x5c\x6c\x0c\x16\x33\x51\xde\x8f\xe0\x4c\x9d\x13\x7a\x21\xd3\x09\x7b\x4b\xaf\x04\xbf\x92\xec\x84\xcf\xb5\x7b\xd9\xef\x42\xc4\x13\xfc\x97\x9a\xd9\x49\x37\xf9\xc5\xea\x3a\xc8\x89\xd8\x5a\x2a\xdc\x70\x8d\x13\x59\xba\xfe\xe2\x4f\x00\x00\x00\xff\xff\x42\x35\xda\x66\xdd\x03\x00\x00")
func data_dockerfile_centos_template_bytes() ([]byte, error) {
return bindata_read(
_data_dockerfile_centos_template,
"data/Dockerfile-centos.template",
)
}
func data_dockerfile_centos_template() (*asset, error) {
bytes, err := data_dockerfile_centos_template_bytes()
if err != nil {
return nil, err
}
info := bindata_file_info{name: "data/Dockerfile-centos.template", size: 989, mode: os.FileMode(420), modTime: time.Unix(1437584302, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _data_dockerfile_lucid_template = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x74\x53\xcb\x6e\xdb\x30\x10\xbc\xfb\x2b\x16\x3e\xe4\x46\x12\x49\x1f\x40\x0b\x38\x40\x90\x34\x45\xd0\x36\x29\x9c\xa6\xbd\xe4\x42\x89\x2b\x99\x2d\x45\x0a\x7c\xa4\x71\x52\xff\x7b\x57\x92\x29\xcb\x6e\xea\x8b\x87\xc3\x59\x72\x67\xc4\xbd\x5c\xde\x7c\x81\xe7\x67\x7e\xa1\x43\xf4\x6e\xb3\x99\x2d\xef\xae\x01\xcb\x95\x83\xb9\xc2\x02\x56\x31\xb6\xef\x85\x08\x58\x26\xaf\xe3\x9a\xa7\x22\xd9\x98\x78\xe9\x1a\x31\x40\x30\xa9\xd4\x8a\x65\x01\x34\x52\xdb\x39\x9c\x9e\x82\xc0\x58\x0a\xd9\x46\x11\x5c\xf2\x25\x06\x6e\xe8\x86\xfe\x74\x22\x59\x8d\x11\x52\xab\x64\xc4\x3d\x4a\xdb\x10\xa5\x31\xc0\xd6\xe0\x53\xb1\x3e\xe6\xef\xf8\x31\xab\x12\x31\x45\xd2\x46\x31\x0c\x01\x6d\xd4\xd2\xc0\xfd\x0c\xe8\x67\x74\x51\xbe\x65\x0a\x1f\x3a\x54\x55\x3a\xc3\x5a\x15\x4d\xc6\x96\x3a\x0b\x18\xde\xf4\xeb\xb1\xcc\xa3\x54\x46\x5b\xcc\xaa\x10\x4c\x86\x6b\xd9\x0c\xf8\x89\x16\xc7\xf5\x7e\x9d\x6b\xd1\x76\xda\xb1\xbd\x49\xa3\x9d\x90\x2e\x33\xbd\xa5\x0e\xe4\xf8\x5a\xef\x54\x2a\xa3\x76\x96\x97\x15\xef\x0a\x6a\x6c\x02\x77\xbe\x16\x79\x31\x02\x76\xc2\x5f\xf3\x13\x1e\xeb\x27\xf8\x13\xa5\x07\xf7\xf8\x74\x0e\x22\x36\xed\x70\xaa\xea\xf1\x81\x1a\x8e\x8e\x76\x6d\x40\xc0\x98\x5a\xee\x8b\xbe\x80\x44\x03\x9b\xa3\xad\xda\x06\x18\x2b\xb4\x55\xda\x2f\x44\x0a\x5e\x10\x26\xc6\x3a\xe6\x95\x2b\xb7\x48\xef\x3c\x74\x8f\xc3\xfd\xb6\xc6\x49\x75\xe7\xcd\x66\x73\xd0\xd5\x8f\x9b\xe5\xa7\x8b\xab\xe5\xae\x2d\x46\x05\x4b\xfa\xff\x8e\x3e\x90\xe3\xed\x93\x3a\xbf\xfc\x7c\xf6\xf1\x76\x31\x67\x8d\xf4\xe5\x6a\x61\x65\xd4\x0f\x08\xec\xe6\xd5\x1c\xb8\x28\x9d\xad\x74\x9d\x3c\xf6\x39\x33\xd6\x7a\xac\xf4\xe3\x42\x38\x7a\x3e\xdd\x91\x87\x27\x6e\x65\x68\x65\x61\x90\x85\x95\xf4\xa8\xb6\x9c\xd2\xa1\x27\xb7\x76\x59\x67\x69\x4f\xdd\xf9\x60\x1e\x4d\xdf\x40\xdf\x5a\x23\x7f\x51\x27\x3f\xe9\x92\xeb\xd4\x9c\x7f\xbd\xa3\xf3\x73\x58\x17\x1f\x6e\xbf\x91\xb9\x45\x6f\x8e\x92\x9b\xed\xec\xf6\xa5\x5d\x98\xc3\xd3\x60\x01\x28\xd0\xbc\x88\xd0\x0d\xcf\x76\x61\xe1\xc5\x58\xf2\xb6\xec\x12\x3e\xa3\x50\x76\xd4\x03\xfc\x47\x4c\xf4\x55\x44\x2f\xe3\x10\x6c\x2f\x56\x93\x29\xb8\x9f\x50\x79\x1c\xa6\xdc\x38\x17\x53\xf2\x85\x01\x19\x36\xf6\x66\x64\xba\x91\x87\x65\xca\x8d\x53\x33\x92\xff\x8c\x0f\x1b\x9e\x8c\x98\xa4\xd6\x82\x20\x4f\x97\xda\xe0\xb5\x6c\x70\xf4\x49\x1f\x7e\xf6\x37\x00\x00\xff\xff\xbd\x5d\x8e\xdb\x9a\x04\x00\x00")
func data_dockerfile_lucid_template_bytes() ([]byte, error) {
return bindata_read(
_data_dockerfile_lucid_template,
"data/Dockerfile-lucid.template",
)
}
func data_dockerfile_lucid_template() (*asset, error) {
bytes, err := data_dockerfile_lucid_template_bytes()
if err != nil {
return nil, err
}
info := bindata_file_info{name: "data/Dockerfile-lucid.template", size: 1178, mode: os.FileMode(420), modTime: time.Unix(1437580963, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _data_dockerfile_template = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x74\x52\x4f\x73\xd3\x3e\x10\xbd\xfb\x53\xec\xf8\xfc\x53\x3c\x9d\xce\x8f\x19\x0e\x3e\x74\x12\xc2\x74\x80\x84\x71\x09\x1c\x28\x07\xd9\x5a\xbb\x02\x59\xf2\x48\x72\x68\x5a\xf2\xdd\x59\x2b\x96\xe3\x40\xc9\x25\xbb\x6f\xff\x78\xdf\xd3\x5b\x17\xdb\x0f\xf0\xfc\xbc\x58\x49\xe7\xad\x39\x1e\x93\x62\xb7\x01\xde\x79\xd6\xa0\x87\xbe\x13\xdc\xe3\x05\x24\xb5\xf3\x5c\x29\x60\x07\xb0\x7d\x79\xb8\x5a\xbc\x5e\x5c\x43\xd9\x4b\x25\x18\x3a\x87\xda\x4b\xae\xe0\x3e\x01\xfa\x29\x59\x56\xaf\x98\xc0\xfd\x10\xd5\xb5\x8c\x61\x23\xca\x36\xc6\xba\xea\xad\x43\xf7\x7f\xc8\xa7\x31\x8b\x5c\x28\xa9\x31\x76\x39\xa7\x62\x78\xe0\xed\x29\x7e\xa2\xe4\xaa\x99\xcd\xd1\x26\x15\x4e\xfd\x9a\x66\xbd\xb3\x59\x29\x75\xd6\x60\x9b\xfe\x07\xe9\x78\xf4\x10\xd6\x5d\x40\x18\xa3\xb2\x90\x36\x8f\xad\x27\x50\x1b\x66\x85\xa9\xce\x89\x4c\xbf\x85\x9d\xc3\xf2\x20\x93\xf9\xa9\x95\xe1\x62\x67\xd5\xf1\xf8\xcb\x73\x0b\xe6\xf1\x69\x09\x99\x6f\xbb\xe4\xcb\xb6\x78\xb7\xba\x2d\x42\x92\x0d\xe2\x30\x1a\x28\xe8\xff\x33\x5a\x27\x8d\x1e\xc5\x5d\xae\xdf\xdf\xbc\xbd\xcb\x53\xd6\x72\x5b\x3d\xe4\x9a\x7b\xb9\x47\x60\xdb\xeb\x14\x16\x59\x65\x74\x2d\x9b\xde\x62\x20\xc5\x58\x67\xb1\x96\x8f\x79\x66\x3a\x1f\x56\xfe\xb9\x71\x6c\x43\xcd\x4b\x85\xcc\x3d\x70\x8b\x62\xc4\x84\x74\x01\x1c\xc9\x33\xe2\x75\xd9\x3d\xf0\x60\x16\x55\x38\x20\x9c\xd6\xf2\x1f\x74\xc9\x77\xfa\xc8\xa6\x6f\x97\x1f\x77\xb4\x3f\xbe\xf7\xea\xcd\xdd\x27\x22\x97\x07\x72\x24\x62\x72\xa6\x1b\x46\x09\x1a\xdf\x81\x39\x20\x61\x63\xe2\x41\x60\x19\x13\x0d\x2f\xca\x12\xcb\x7c\x50\xf8\x86\x44\x39\x43\x7b\xf8\x47\x33\xc1\xb7\x1e\x2d\xdd\x1e\x84\x0d\xcd\x62\x66\xb9\xfb\x19\x14\xbd\x37\xc7\x26\x13\xce\xc1\x17\xdc\x78\x2a\x5c\x18\x72\x5e\x88\xce\x9c\x63\x93\x45\x27\xf0\x2f\xaf\xb2\x93\x65\xb2\x99\x6a\x1d\x64\xc4\x69\x2d\x15\x6e\x78\x8b\x13\x4f\x7a\xf8\xe4\x77\x00\x00\x00\xff\xff\x87\x23\x8c\x09\xa4\x03\x00\x00")
func data_dockerfile_template_bytes() ([]byte, error) {
return bindata_read(
_data_dockerfile_template,
"data/Dockerfile.template",
)
}
func data_dockerfile_template() (*asset, error) {
bytes, err := data_dockerfile_template_bytes()
if err != nil {
return nil, err
}
info := bindata_file_info{name: "data/Dockerfile.template", size: 932, mode: os.FileMode(420), modTime: time.Unix(1437580963, 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){
"data/Dockerfile-centos.template": data_dockerfile_centos_template,
"data/Dockerfile-lucid.template": data_dockerfile_lucid_template,
"data/Dockerfile.template": data_dockerfile_template,
}
// 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 name := range node.Children {
rv = append(rv, name)
}
return rv, nil
}
type _bintree_t struct {
Func func() (*asset, error)
Children map[string]*_bintree_t
}
var _bintree = &_bintree_t{nil, map[string]*_bintree_t{
"data": &_bintree_t{nil, map[string]*_bintree_t{
"Dockerfile-centos.template": &_bintree_t{data_dockerfile_centos_template, map[string]*_bintree_t{
}},
"Dockerfile-lucid.template": &_bintree_t{data_dockerfile_lucid_template, map[string]*_bintree_t{
}},
"Dockerfile.template": &_bintree_t{data_dockerfile_template, map[string]*_bintree_t{
}},
}},
}}
// Restore 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, path.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
}
// Restore assets under the given directory recursively
func RestoreAssets(dir, name string) error {
children, err := AssetDir(name)
if err != nil { // File
return RestoreAsset(dir, name)
} else { // Dir
for _, child := range children {
err = RestoreAssets(dir, path.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, "/")...)...)
}