Browse code

Images can be removed by short-hand ID. Solves #306.

Solomon Hykes authored on 2013/04/02 08:04:44
Showing 1 changed files
... ...
@@ -161,7 +161,11 @@ func isNotEmpty(err error) bool {
161 161
 }
162 162
 
163 163
 // Delete atomically removes an image from the graph.
164
-func (graph *Graph) Delete(id string) error {
164
+func (graph *Graph) Delete(name string) error {
165
+	id, err := graph.idIndex.Get(name)
166
+	if err != nil {
167
+		return err
168
+	}
165 169
 	garbage, err := graph.Garbage()
166 170
 	if err != nil {
167 171
 		return err