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

use ParseRepositoryTag instead on split on : in imagedelete

This commit is contained in:
Victor Vieux 2013-07-29 12:15:27 +00:00
parent 97a2dc96f2
commit 63876e7dbd

View file

@ -1037,13 +1037,7 @@ func (srv *Server) ImageDelete(name string, autoPrune bool) ([]APIRmi, error) {
return nil, nil return nil, nil
} }
var tag string name, tag := utils.ParseRepositoryTag(name)
if strings.Contains(name, ":") {
nameParts := strings.Split(name, ":")
name = nameParts[0]
tag = nameParts[1]
}
return srv.deleteImage(img, name, tag) return srv.deleteImage(img, name, tag)
} }