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

Rename "v" in "removeVolume"

This commit is contained in:
Guillaume J. Charmes 2013-05-09 19:19:55 -07:00
parent 2a303dab85
commit 0c6380cc32
2 changed files with 4 additions and 4 deletions

4
api.go
View file

@ -411,9 +411,9 @@ func deleteContainers(srv *Server, w http.ResponseWriter, r *http.Request, vars
return nil, fmt.Errorf("Missing parameter")
}
name := vars["name"]
v := r.Form.Get("v") == "1"
removeVolume := r.Form.Get("removeVolume") == "1"
if err := srv.ContainerDestroy(name, v); err != nil {
if err := srv.ContainerDestroy(name, removeVolume); err != nil {
return nil, err
}
w.WriteHeader(http.StatusNoContent)

View file

@ -413,7 +413,7 @@ func (srv *Server) ContainerRestart(name string, t int) error {
return nil
}
func (srv *Server) ContainerDestroy(name string, v bool) error {
func (srv *Server) ContainerDestroy(name string, removeVolume bool) error {
if container := srv.runtime.Get(name); container != nil {
volumes := make(map[string]struct{})
@ -425,7 +425,7 @@ func (srv *Server) ContainerDestroy(name string, v bool) error {
return fmt.Errorf("Error destroying container %s: %s", name, err.Error())
}
if v {
if removeVolume {
// Retrieve all volumes from all remaining containers
usedVolumes := make(map[string]*Container)
for _, container := range srv.runtime.List() {