1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

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

This commit is contained in:
Solomon Hykes 2013-04-01 16:04:44 -07:00
parent 7ad2e022fb
commit ff5cb8e864

View file

@ -161,7 +161,11 @@ func isNotEmpty(err error) bool {
}
// Delete atomically removes an image from the graph.
func (graph *Graph) Delete(id string) error {
func (graph *Graph) Delete(name string) error {
id, err := graph.idIndex.Get(name)
if err != nil {
return err
}
garbage, err := graph.Garbage()
if err != nil {
return err