|
@@ -22,7 +22,11 @@ type imageContexts struct {
|
|
currentName string
|
|
currentName string
|
|
}
|
|
}
|
|
|
|
|
|
-func (ic *imageContexts) new(name string, increment bool) (*imageMount, error) {
|
|
|
|
|
|
+func (ic *imageContexts) newImageMount(id string) *imageMount {
|
|
|
|
+ return &imageMount{ic: ic, id: id}
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (ic *imageContexts) add(name string) (*imageMount, error) {
|
|
im := &imageMount{ic: ic}
|
|
im := &imageMount{ic: ic}
|
|
if len(name) > 0 {
|
|
if len(name) > 0 {
|
|
if ic.byName == nil {
|
|
if ic.byName == nil {
|
|
@@ -33,10 +37,8 @@ func (ic *imageContexts) new(name string, increment bool) (*imageMount, error) {
|
|
}
|
|
}
|
|
ic.byName[name] = im
|
|
ic.byName[name] = im
|
|
}
|
|
}
|
|
- if increment {
|
|
|
|
- ic.list = append(ic.list, im)
|
|
|
|
- }
|
|
|
|
ic.currentName = name
|
|
ic.currentName = name
|
|
|
|
+ ic.list = append(ic.list, im)
|
|
return im, nil
|
|
return im, nil
|
|
}
|
|
}
|
|
|
|
|